diff --git a/Control/Arrow.hs b/Control/Arrow.hs
--- a/Control/Arrow.hs
+++ b/Control/Arrow.hs
@@ -1,8 +1,11 @@
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE DeriveFunctor #-}
+{-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE StandaloneDeriving #-}
 {-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
     -- The RULES for the methods of class Arrow may never fire
-    -- e.g. compose/arr;  see Trac #10528
+    -- e.g. compose/arr;  see #10528
 
 -----------------------------------------------------------------------------
 -- |
@@ -51,6 +54,7 @@
 import Control.Monad.Fix
 import Control.Category
 import GHC.Base hiding ( (.), id )
+import GHC.Generics (Generic, Generic1)
 
 infixr 5 <+>
 infixr 3 ***
@@ -148,6 +152,45 @@
 
 -- | Kleisli arrows of a monad.
 newtype Kleisli m a b = Kleisli { runKleisli :: a -> m b }
+
+-- | @since 4.14.0.0
+deriving instance Generic (Kleisli m a b)
+
+-- | @since 4.14.0.0
+deriving instance Generic1 (Kleisli m a)
+
+-- | @since 4.14.0.0
+deriving instance Functor m => Functor (Kleisli m a)
+
+-- | @since 4.14.0.0
+instance Applicative m => Applicative (Kleisli m a) where
+  pure = Kleisli . const . pure
+  {-# INLINE pure #-}
+  Kleisli f <*> Kleisli g = Kleisli $ \x -> f x <*> g x
+  {-# INLINE (<*>) #-}
+  Kleisli f *> Kleisli g = Kleisli $ \x -> f x *> g x
+  {-# INLINE (*>) #-}
+  Kleisli f <* Kleisli g = Kleisli $ \x -> f x <* g x
+  {-# INLINE (<*) #-}
+
+-- | @since 4.14.0.0
+instance Alternative m => Alternative (Kleisli m a) where
+  empty = Kleisli $ const empty
+  {-# INLINE empty #-}
+  Kleisli f <|> Kleisli g = Kleisli $ \x -> f x <|> g x
+  {-# INLINE (<|>) #-}
+
+-- | @since 4.14.0.0
+instance Monad m => Monad (Kleisli m a) where
+  Kleisli f >>= k = Kleisli $ \x -> f x >>= \a -> runKleisli (k a) x
+  {-# INLINE (>>=) #-}
+
+-- | @since 4.14.0.0
+instance MonadPlus m => MonadPlus (Kleisli m a) where
+  mzero = Kleisli $ const mzero
+  {-# INLINE mzero #-}
+  Kleisli f `mplus` Kleisli g = Kleisli $ \x -> f x `mplus` g x
+  {-# INLINE mplus #-}
 
 -- | @since 3.0
 instance Monad m => Category (Kleisli m) where
diff --git a/Control/Category.hs b/Control/Category.hs
--- a/Control/Category.hs
+++ b/Control/Category.hs
@@ -4,7 +4,7 @@
 {-# LANGUAGE PolyKinds #-}
 {-# OPTIONS_GHC -Wno-inline-rule-shadowing #-}
     -- The RULES for the methods of class Category may never fire
-    -- e.g. identity/left, identity/right, association;  see Trac #10528
+    -- e.g. identity/left, identity/right, association;  see #10528
 
 -----------------------------------------------------------------------------
 -- |
@@ -16,14 +16,14 @@
 -- Stability   :  experimental
 -- Portability :  portable
 
--- http://ghc.haskell.org/trac/ghc/ticket/1773
+-- https://gitlab.haskell.org/ghc/ghc/issues/1773
 
 module Control.Category where
 
 import qualified GHC.Base (id,(.))
 import Data.Type.Coercion
 import Data.Type.Equality
-import GHC.Prim (coerce)
+import Data.Coerce (coerce)
 
 infixr 9 .
 infixr 1 >>>, <<<
diff --git a/Control/Concurrent/QSemN.hs b/Control/Concurrent/QSemN.hs
--- a/Control/Concurrent/QSemN.hs
+++ b/Control/Concurrent/QSemN.hs
@@ -1,4 +1,6 @@
-{-# LANGUAGE Safe #-}
+{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE BangPatterns #-}
+{-# OPTIONS_GHC -funbox-strict-fields #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -23,11 +25,12 @@
           signalQSemN   -- :: QSemN -> Int -> IO ()
       ) where
 
-import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar, tryTakeMVar
-                          , putMVar, newMVar
+import Control.Concurrent.MVar ( MVar, newEmptyMVar, takeMVar
                           , tryPutMVar, isEmptyMVar)
 import Control.Exception
-import Data.Maybe
+import Control.Monad (when)
+import Data.IORef (IORef, newIORef, atomicModifyIORef)
+import System.IO.Unsafe (unsafePerformIO)
 
 -- | 'QSemN' is a quantity semaphore in which the resource is acquired
 -- and released in units of one. It provides guaranteed FIFO ordering
@@ -39,7 +42,7 @@
 --
 -- is safe; it never loses any of the resource.
 --
-newtype QSemN = QSemN (MVar (Int, [(Int, MVar ())], [(Int, MVar ())]))
+data QSemN = QSemN !(IORef (Int, [(Int, MVar ())], [(Int, MVar ())]))
 
 -- The semaphore state (i, xs, ys):
 --
@@ -55,9 +58,7 @@
 -- A thread can dequeue itself by also putting () into the MVar, which
 -- it must do if it receives an exception while blocked in waitQSemN.
 -- This means that when unblocking a thread in signalQSemN we must
--- first check whether the MVar is already full; the MVar lock on the
--- semaphore itself resolves race conditions between signalQSemN and a
--- thread attempting to dequeue itself.
+-- first check whether the MVar is already full.
 
 -- |Build a new 'QSemN' with a supplied initial quantity.
 --  The initial quantity must be at least 0.
@@ -65,54 +66,65 @@
 newQSemN initial
   | initial < 0 = fail "newQSemN: Initial quantity must be non-negative"
   | otherwise   = do
-      sem <- newMVar (initial, [], [])
+      sem <- newIORef (initial, [], [])
       return (QSemN sem)
 
+-- An unboxed version of Maybe (MVar a)
+data MaybeMV a = JustMV !(MVar a) | NothingMV
+
 -- |Wait for the specified quantity to become available
 waitQSemN :: QSemN -> Int -> IO ()
-waitQSemN (QSemN m) sz =
-  mask_ $ do
-    (i,b1,b2) <- takeMVar m
+-- We need to mask here. Once we've enqueued our MVar, we need
+-- to be sure to wait for it. Otherwise, we could lose our
+-- allocated resource.
+waitQSemN qs@(QSemN m) sz = mask_ $ do
+    -- unsafePerformIO and not unsafeDupablePerformIO. We must
+    -- be sure to wait on the same MVar that gets enqueued.
+  mmvar <- atomicModifyIORef m $ \ (i,b1,b2) -> unsafePerformIO $ do
     let z = i-sz
     if z < 0
-       then do
-         b <- newEmptyMVar
-         putMVar m (i, b1, (sz,b):b2)
-         wait b
-       else do
-         putMVar m (z, b1, b2)
-         return ()
+      then do
+        b <- newEmptyMVar
+        return ((i, b1, (sz,b):b2), JustMV b)
+      else return ((z, b1, b2), NothingMV)
+
+  -- Note: this case match actually allocates the MVar if necessary.
+  case mmvar of
+    NothingMV -> return ()
+    JustMV b -> wait b
   where
+    wait :: MVar () -> IO ()
     wait b = do
-        takeMVar b `onException`
-                (uninterruptibleMask_ $ do -- Note [signal uninterruptible]
-                   (i,b1,b2) <- takeMVar m
-                   r <- tryTakeMVar b
-                   r' <- if isJust r
-                            then signal sz (i,b1,b2)
-                            else do putMVar b (); return (i,b1,b2)
-                   putMVar m r')
+      takeMVar b `onException` do
+        already_filled <- not <$> tryPutMVar b ()
+        when already_filled $ signalQSemN qs sz
 
 -- |Signal that a given quantity is now available from the 'QSemN'.
 signalQSemN :: QSemN -> Int -> IO ()
-signalQSemN (QSemN m) sz = uninterruptibleMask_ $ do
-  r <- takeMVar m
-  r' <- signal sz r
-  putMVar m r'
-
-signal :: Int
-       -> (Int,[(Int,MVar ())],[(Int,MVar ())])
-       -> IO (Int,[(Int,MVar ())],[(Int,MVar ())])
+-- We don't need to mask here because we should *already* be masked
+-- here (e.g., by bracket). Indeed, if we're not already masked,
+-- it's too late to do so.
+--
+-- What if the unsafePerformIO thunk is forced in another thread,
+-- and receives an asynchronous exception? That shouldn't be a
+-- problem: when we force it ourselves, presumably masked, we
+-- will resume its execution.
+signalQSemN (QSemN m) sz0 = do
+    -- unsafePerformIO and not unsafeDupablePerformIO. We must not
+    -- wake up more threads than we're supposed to.
+  unit <- atomicModifyIORef m $ \(i,a1,a2) ->
+            unsafePerformIO (loop (sz0 + i) a1 a2)
 
-signal sz0 (i,a1,a2) = loop (sz0 + i) a1 a2
+  -- Forcing this will actually wake the necessary threads.
+  evaluate unit
  where
-   loop 0  bs b2 = return (0,  bs, b2)
-   loop sz [] [] = return (sz, [], [])
+   loop 0  bs b2 = return ((0,  bs, b2), ())
+   loop sz [] [] = return ((sz, [], []), ())
    loop sz [] b2 = loop sz (reverse b2) []
    loop sz ((j,b):bs) b2
      | j > sz = do
        r <- isEmptyMVar b
-       if r then return (sz, (j,b):bs, b2)
+       if r then return ((sz, (j,b):bs, b2), ())
             else loop sz bs b2
      | otherwise = do
        r <- tryPutMVar b ()
diff --git a/Control/Monad.hs b/Control/Monad.hs
--- a/Control/Monad.hs
+++ b/Control/Monad.hs
@@ -18,7 +18,7 @@
     (
     -- * Functor and monad classes
 
-      Functor(fmap)
+      Functor(..)
     , Monad((>>=), (>>), return)
     , MonadFail(fail)
     , MonadPlus(mzero, mplus)
@@ -142,6 +142,13 @@
 infixr 1 <=<, >=>
 
 -- | Left-to-right composition of Kleisli arrows.
+--
+-- \'@(bs '>=>' cs) a@\' can be understood as the @do@ expression
+--
+-- @
+-- do b <- bs a
+--    cs b
+-- @
 (>=>)       :: Monad m => (a -> m b) -> (b -> m c) -> (a -> m c)
 f >=> g     = \x -> f x >>= g
 
@@ -157,6 +164,17 @@
 
 -- | Repeat an action indefinitely.
 --
+-- Using @ApplicativeDo@: \'@'forever' as@\' can be understood as the
+-- pseudo-@do@ expression
+--
+-- @
+-- do as
+--    as
+--    ..
+-- @
+--
+-- with @as@ repeating.
+--
 -- ==== __Examples__
 --
 -- A common use of 'forever' is to process input from network sockets,
@@ -193,16 +211,22 @@
 -- data structures or a state monad.
 mapAndUnzipM      :: (Applicative m) => (a -> m (b,c)) -> [a] -> m ([b], [c])
 {-# INLINE mapAndUnzipM #-}
+-- Inline so that fusion with 'unzip' and 'traverse' has a chance to fire.
+-- See Note [Inline @unzipN@ functions] in GHC/OldList.hs.
 mapAndUnzipM f xs =  unzip <$> traverse f xs
 
 -- | The 'zipWithM' function generalizes 'zipWith' to arbitrary applicative functors.
 zipWithM          :: (Applicative m) => (a -> b -> m c) -> [a] -> [b] -> m [c]
 {-# INLINE zipWithM #-}
+-- Inline so that fusion with zipWith and sequenceA have a chance to fire
+-- See Note [Fusion for zipN/zipWithN] in List.hs]
 zipWithM f xs ys  =  sequenceA (zipWith f xs ys)
 
 -- | 'zipWithM_' is the extension of 'zipWithM' which ignores the final result.
 zipWithM_         :: (Applicative m) => (a -> b -> m c) -> [a] -> [b] -> m ()
 {-# INLINE zipWithM_ #-}
+-- Inline so that fusion with zipWith and sequenceA have a chance to fire
+-- See Note [Fusion for zipN/zipWithN] in List.hs]
 zipWithM_ f xs ys =  sequenceA_ (zipWith f xs ys)
 
 {- | The 'foldM' function is analogous to 'Data.Foldable.foldl', except that its result is
@@ -256,12 +280,26 @@
 inline the entire definition (as happens for foldr, for example) thereby
 specialising for the particular action.
 
-For further information, see this Trac comment, which includes side-by-side
-Core: https://ghc.haskell.org/trac/ghc/ticket/11795#comment:6
+For further information, see this issue comment, which includes side-by-side
+Core: https://gitlab.haskell.org/ghc/ghc/issues/11795#note_118976
 -}
 
 -- | @'replicateM' n act@ performs the action @n@ times,
 -- gathering the results.
+--
+-- Using @ApplicativeDo@: \'@'replicateM' 5 as@\' can be understood as
+-- the @do@ expression
+--
+-- @
+-- do a1 <- as
+--    a2 <- as
+--    a3 <- as
+--    a4 <- as
+--    a5 <- as
+--    pure [a1,a2,a3,a4,a5]
+-- @
+--
+-- Note the @Applicative@ constraint.
 replicateM        :: (Applicative m) => Int -> m a -> m [a]
 {-# INLINABLE replicateM #-}
 {-# SPECIALISE replicateM :: Int -> IO a -> IO [a] #-}
diff --git a/Control/Monad/Fail.hs b/Control/Monad/Fail.hs
--- a/Control/Monad/Fail.hs
+++ b/Control/Monad/Fail.hs
@@ -38,8 +38,7 @@
 --
 module Control.Monad.Fail ( MonadFail(fail) ) where
 
-import GHC.Base (String, Monad(), Maybe(Nothing), IO())
-import {-# SOURCE #-} GHC.IO (failIO)
+import GHC.Base (String, Monad(), Maybe(Nothing), IO(), failIO)
 
 -- | When a value is bound in @do@-notation, the pattern on the left
 -- hand side of @<-@ might not match. In this case, this class
diff --git a/Control/Monad/Fix.hs b/Control/Monad/Fix.hs
--- a/Control/Monad/Fix.hs
+++ b/Control/Monad/Fix.hs
@@ -156,4 +156,3 @@
 -- | @since 4.12.0.0
 instance MonadFix Down where
     mfix f = Down (fix (getDown . f))
-      where getDown (Down x) = x
diff --git a/Control/Monad/ST/Imp.hs b/Control/Monad/ST/Imp.hs
--- a/Control/Monad/ST/Imp.hs
+++ b/Control/Monad/ST/Imp.hs
@@ -75,7 +75,7 @@
 
 We knew that lazy blackholing could cause the computation to be re-run if the
 result was demanded strictly, but we thought that would be okay in the case of
-ST. However, that is not the case (see Trac #15349). Notably, the first time
+ST. However, that is not the case (see #15349). Notably, the first time
 the computation is executed, it may mutate variables that cause it to behave
 *differently* the second time it's run. That may allow it to terminate when it
 should not. More frighteningly, Arseniy Alekseyev produced a somewhat contrived
diff --git a/Control/Monad/Zip.hs b/Control/Monad/Zip.hs
--- a/Control/Monad/Zip.hs
+++ b/Control/Monad/Zip.hs
@@ -52,7 +52,7 @@
     munzip mab = (liftM fst mab, liftM snd mab)
     -- munzip is a member of the class because sometimes
     -- you can implement it more efficiently than the
-    -- above default code.  See Trac #4370 comment by giorgidze
+    -- above default code.  See #4370 comment by giorgidze
 
 -- | @since 4.3.1.0
 instance MonadZip [] where
diff --git a/Data/Bits.hs b/Data/Bits.hs
--- a/Data/Bits.hs
+++ b/Data/Bits.hs
@@ -58,7 +58,6 @@
 #include "MachDeps.h"
 
 import Data.Maybe
-import GHC.Enum
 import GHC.Num
 import GHC.Base
 import GHC.Real
@@ -438,6 +437,9 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    -- We want popCnt# to be inlined in user code so that `ghc -msse4.2`
+    -- can compile it down to a popcnt instruction without an extra function call
+    {-# INLINE popCount #-}
 
     zeroBits = 0
 
@@ -478,19 +480,21 @@
 instance FiniteBits Int where
     finiteBitSize _ = WORD_SIZE_IN_BITS
     countLeadingZeros  (I# x#) = I# (word2Int# (clz# (int2Word# x#)))
+    {-# INLINE countLeadingZeros #-}
     countTrailingZeros (I# x#) = I# (word2Int# (ctz# (int2Word# x#)))
+    {-# INLINE countTrailingZeros #-}
 
 -- | @since 2.01
 instance Bits Word where
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W# x#) .&.   (W# y#)    = W# (x# `and#` y#)
     (W# x#) .|.   (W# y#)    = W# (x# `or#`  y#)
     (W# x#) `xor` (W# y#)    = W# (x# `xor#` y#)
-    complement (W# x#)       = W# (x# `xor#` mb#)
-        where !(W# mb#) = maxBound
+    complement (W# x#)       = W# (not# x#)
     (W# x#) `shift` (I# i#)
         | isTrue# (i# >=# 0#)      = W# (x# `shiftL#` i#)
         | otherwise                = W# (x# `shiftRL#` negateInt# i#)
@@ -519,7 +523,9 @@
 instance FiniteBits Word where
     finiteBitSize _ = WORD_SIZE_IN_BITS
     countLeadingZeros  (W# x#) = I# (word2Int# (clz# x#))
+    {-# INLINE countLeadingZeros #-}
     countTrailingZeros (W# x#) = I# (word2Int# (ctz# x#))
+    {-# INLINE countTrailingZeros #-}
 
 -- | @since 2.01
 instance Bits Integer where
diff --git a/Data/Coerce.hs b/Data/Coerce.hs
--- a/Data/Coerce.hs
+++ b/Data/Coerce.hs
@@ -1,5 +1,6 @@
 {-# LANGUAGE Unsafe #-}
 {-# LANGUAGE NoImplicitPrelude #-}
+{-# LANGUAGE MagicHash #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -14,16 +15,18 @@
 -- Safe coercions between data types.
 --
 -- More in-depth information can be found on the
--- <https://ghc.haskell.org/trac/ghc/wiki/Roles Roles wiki page>
+-- <https://gitlab.haskell.org/ghc/ghc/wikis/roles Roles wiki page>
 --
 -- @since 4.7.0.0
 -----------------------------------------------------------------------------
 
 module Data.Coerce
         ( -- * Safe coercions
-          coerce, Coercible,
+          coerce, Coercible
         ) where
 import GHC.Prim (coerce)
 import GHC.Types (Coercible)
 
-import GHC.Base () -- for build ordering; see Notes in GHC.Base for more info
+-- The import of GHC.Base is for build ordering; see Notes in GHC.Base for
+-- more info.
+import GHC.Base ()
diff --git a/Data/Data.hs b/Data/Data.hs
--- a/Data/Data.hs
+++ b/Data/Data.hs
@@ -131,6 +131,8 @@
 import Text.Read( reads )
 
 -- Imports for the instances
+import Control.Applicative (WrappedArrow(..), WrappedMonad(..), ZipList(..))
+       -- So we can give them Data instances
 import Data.Functor.Identity -- So we can give Data instance for Identity
 import Data.Int              -- So we can give Data instance for Int8, ...
 import Data.Type.Coercion
@@ -1108,7 +1110,7 @@
 
 -- NB: This Data instance intentionally uses the (%) smart constructor instead
 -- of the internal (:%) constructor to preserve the invariant that a Ratio
--- value is reduced to normal form. See Trac #10011.
+-- value is reduced to normal form. See #10011.
 
 -- | @since 4.0.0.0
 instance (Data a, Integral a) => Data (Ratio a) where
@@ -1155,6 +1157,18 @@
 
 
 ------------------------------------------------------------------------------
+
+-- | @since 4.14.0.0
+deriving instance (Typeable (a :: Type -> Type -> Type), Typeable b, Typeable c,
+                   Data (a b c))
+         => Data (WrappedArrow a b c)
+
+-- | @since 4.14.0.0
+deriving instance (Typeable (m :: Type -> Type), Typeable a, Data (m a))
+         => Data (WrappedMonad m a)
+
+-- | @since 4.14.0.0
+deriving instance Data a => Data (ZipList a)
 
 -- | @since 4.9.0.0
 deriving instance Data a => Data (NonEmpty a)
diff --git a/Data/Fixed.hs b/Data/Fixed.hs
--- a/Data/Fixed.hs
+++ b/Data/Fixed.hs
@@ -1,5 +1,7 @@
 {-# LANGUAGE Trustworthy #-}
 {-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE FlexibleInstances #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -37,28 +39,29 @@
 ) where
 
 import Data.Data
+import GHC.TypeLits (KnownNat, natVal)
 import GHC.Read
 import Text.ParserCombinators.ReadPrec
 import Text.Read.Lex
 
 default () -- avoid any defaulting shenanigans
 
--- | generalisation of 'div' to any instance of 'Real'
+-- | Generalisation of 'div' to any instance of 'Real'
 div' :: (Real a,Integral b) => a -> a -> b
 div' n d = floor ((toRational n) / (toRational d))
 
--- | generalisation of 'divMod' to any instance of 'Real'
+-- | Generalisation of 'divMod' to any instance of 'Real'
 divMod' :: (Real a,Integral b) => a -> a -> (b,a)
 divMod' n d = (f,n - (fromIntegral f) * d) where
     f = div' n d
 
--- | generalisation of 'mod' to any instance of 'Real'
+-- | Generalisation of 'mod' to any instance of 'Real'
 mod' :: (Real a) => a -> a -> a
 mod' n d = n - (fromInteger f) * d where
     f = div' n d
 
 -- | The type parameter should be an instance of 'HasResolution'.
-newtype Fixed a = MkFixed Integer
+newtype Fixed (a :: k) = MkFixed Integer
         deriving ( Eq  -- ^ @since 2.01
                  , Ord -- ^ @since 2.01
                  )
@@ -71,18 +74,22 @@
 conMkFixed = mkConstr tyFixed "MkFixed" [] Prefix
 
 -- | @since 4.1.0.0
-instance (Typeable a) => Data (Fixed a) where
+instance (Typeable k,Typeable a) => Data (Fixed (a :: k)) where
     gfoldl k z (MkFixed a) = k (z MkFixed) a
     gunfold k z _ = k (z MkFixed)
     dataTypeOf _ = tyFixed
     toConstr _ = conMkFixed
 
-class HasResolution a where
+class HasResolution (a :: k) where
     resolution :: p a -> Integer
 
-withType :: (p a -> f a) -> f a
-withType foo = foo undefined
+-- | For example, @Fixed 1000@ will give you a 'Fixed' with a resolution of 1000.
+instance KnownNat n => HasResolution n where
+    resolution _ = natVal (Proxy :: Proxy n)
 
+withType :: (Proxy a -> f a) -> f a
+withType foo = foo Proxy
+
 withResolution :: (HasResolution a) => (Integer -> f a) -> f a
 withResolution foo = withType (foo . resolution)
 
@@ -170,7 +177,7 @@
 convertFixed (Number n)
  | Just (i, f) <- numberToFixed e n =
     return (fromInteger i + (fromInteger f / (10 ^ e)))
-    where r = resolution (undefined :: Fixed a)
+    where r = resolution (Proxy :: Proxy a)
           -- round 'e' up to help make the 'read . show == id' property
           -- possible also for cases where 'resolution' is not a
           -- power-of-10, such as e.g. when 'resolution = 128'
diff --git a/Data/Foldable.hs b/Data/Foldable.hs
--- a/Data/Foldable.hs
+++ b/Data/Foldable.hs
@@ -127,7 +127,7 @@
     -- and combine the results.
     foldMap :: Monoid m => (a -> m) -> t a -> m
     {-# INLINE foldMap #-}
-    -- This INLINE allows more list functions to fuse. See Trac #9848.
+    -- This INLINE allows more list functions to fuse. See #9848.
     foldMap f = foldr (mappend . f) mempty
 
     -- | A variant of 'foldMap' that is strict in the accumulator.
@@ -181,8 +181,8 @@
     -- use 'foldl'' instead of 'foldl'. The reason for this is that latter does
     -- not force the "inner" results (e.g. @z \`f\` x1@ in the above example)
     -- before applying them to the operator (e.g. to @(\`f\` x2)@). This results
-    -- in a thunk chain @O(n)@ elements long, which then must be evaluated from
-    -- the outside-in.
+    -- in a thunk chain \(\mathcal{O}(n)\) elements long, which then must be
+    -- evaluated from the outside-in.
     --
     -- For a general 'Foldable' structure this should be semantically identical
     -- to,
@@ -364,6 +364,8 @@
     foldMap f (_, y) = f y
 
     foldr f z (_, y) = f y z
+    length _  = 1
+    null _ = False
 
 -- | @since 4.8.0.0
 instance Foldable (Array i) where
@@ -718,7 +720,7 @@
     in ...(c x1 y1)...(c x2 y2)....n...
 
 The trouble is that `c`, being big, will not be inlined.  And that can
-be absolutely terrible for performance, as we saw in Trac #8763.
+be absolutely terrible for performance, as we saw in #8763.
 
 It's much better to define
 
@@ -776,7 +778,7 @@
 and minimumBy essentially require that they examine every element of the
 data structure. Using foldr1 to examine every element results in space usage
 proportional to the size of the data structure. For the common case of lists,
-this could be particularly bad (see Trac #10830).
+this could be particularly bad (see #10830).
 
 For the common case of lists, switching the implementations of maximumBy and
 minimumBy to foldl1 solves the issue, as GHC's strictness analysis can then
@@ -784,7 +786,7 @@
 way to fix this problem, as there are other conceivable data structures
 (besides lists) which might benefit from specialized implementations for
 maximumBy and minimumBy (see
-https://ghc.haskell.org/trac/ghc/ticket/10830#comment:26 for a further
+https://gitlab.haskell.org/ghc/ghc/issues/10830#note_129843 for a further
 discussion). But using foldl1 is at least always better than using foldr1, so
 GHC has chosen to adopt that approach for now.
 -}
diff --git a/Data/Function.hs b/Data/Function.hs
--- a/Data/Function.hs
+++ b/Data/Function.hs
@@ -45,7 +45,7 @@
 -- 120
 --
 -- Instead of making a recursive call, we introduce a dummy parameter @rec@;
--- when used within 'fix', this parameter then refers to 'fix' argument, hence
+-- when used within 'fix', this parameter then refers to 'fix'’s argument, hence
 -- the recursion is reintroduced.
 fix :: (a -> a) -> a
 fix f = let x = f x in x
diff --git a/Data/Functor.hs b/Data/Functor.hs
--- a/Data/Functor.hs
+++ b/Data/Functor.hs
@@ -39,8 +39,7 @@
 
 module Data.Functor
     (
-      Functor(fmap),
-      (<$),
+      Functor(..),
       ($>),
       (<$>),
       (<&>),
@@ -126,6 +125,16 @@
 
 -- | Flipped version of '<$'.
 --
+-- Using @ApplicativeDo@: \'@as '$>' b@\' can be understood as the
+-- @do@ expression
+--
+-- @
+-- do as
+--    pure b
+-- @
+--
+-- with an inferred @Functor@ constraint.
+--
 -- @since 4.7.0.0
 --
 -- ==== __Examples__
@@ -162,6 +171,17 @@
 
 -- | @'void' value@ discards or ignores the result of evaluation, such
 -- as the return value of an 'System.IO.IO' action.
+--
+--
+-- Using @ApplicativeDo@: \'@'void' as@\' can be understood as the
+-- @do@ expression
+--
+-- @
+-- do as
+--    pure ()
+-- @
+--
+-- with an inferred @Functor@ constraint.
 --
 -- ==== __Examples__
 --
diff --git a/Data/Functor/Compose.hs b/Data/Functor/Compose.hs
--- a/Data/Functor/Compose.hs
+++ b/Data/Functor/Compose.hs
@@ -1,8 +1,10 @@
-{-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric #-}
+{-# LANGUAGE GADTs #-}
 {-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE ScopedTypeVariables #-}
 {-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE TypeOperators #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Functor.Compose
@@ -27,6 +29,7 @@
 import Control.Applicative
 import Data.Coerce (coerce)
 import Data.Data (Data)
+import Data.Type.Equality (TestEquality(..), (:~:)(..))
 import GHC.Generics (Generic, Generic1)
 import Text.Read (Read(..), readListDefault, readListPrecDefault)
 
@@ -97,6 +100,7 @@
 -- | @since 4.9.0.0
 instance (Functor f, Functor g) => Functor (Compose f g) where
     fmap f (Compose x) = Compose (fmap (fmap f) x)
+    a <$ (Compose x) = Compose (fmap (a <$) x)
 
 -- | @since 4.9.0.0
 instance (Foldable f, Foldable g) => Foldable (Compose f g) where
@@ -118,3 +122,12 @@
     empty = Compose empty
     (<|>) = coerce ((<|>) :: f (g a) -> f (g a) -> f (g a))
       :: forall a . Compose f g a -> Compose f g a -> Compose f g a
+
+-- | The deduction (via generativity) that if @g x :~: g y@ then @x :~: y@.
+--
+-- @since 4.14.0.0
+instance (TestEquality f) => TestEquality (Compose f g) where
+  testEquality (Compose x) (Compose y) =
+    case testEquality x y of -- :: Maybe (g x :~: g y)
+      Just Refl -> Just Refl -- :: Maybe (x :~: y)
+      Nothing   -> Nothing
diff --git a/Data/Functor/Const.hs b/Data/Functor/Const.hs
--- a/Data/Functor/Const.hs
+++ b/Data/Functor/Const.hs
@@ -25,7 +25,7 @@
 import Data.Foldable (Foldable(foldMap))
 import Foreign.Storable (Storable)
 
-import GHC.Arr (Ix)
+import GHC.Ix (Ix)
 import GHC.Base
 import GHC.Enum (Bounded, Enum)
 import GHC.Float (Floating, RealFloat)
diff --git a/Data/Functor/Identity.hs b/Data/Functor/Identity.hs
--- a/Data/Functor/Identity.hs
+++ b/Data/Functor/Identity.hs
@@ -41,7 +41,7 @@
 import Data.Foldable
 import Data.Functor.Utils ((#.))
 import Foreign.Storable (Storable)
-import GHC.Arr (Ix)
+import GHC.Ix (Ix)
 import GHC.Base ( Applicative(..), Eq(..), Functor(..), Monad(..)
                 , Semigroup, Monoid, Ord(..), ($), (.) )
 import GHC.Enum (Bounded, Enum)
diff --git a/Data/Functor/Product.hs b/Data/Functor/Product.hs
--- a/Data/Functor/Product.hs
+++ b/Data/Functor/Product.hs
@@ -81,6 +81,7 @@
 -- | @since 4.9.0.0
 instance (Functor f, Functor g) => Functor (Product f g) where
     fmap f (Pair x y) = Pair (fmap f x) (fmap f y)
+    a <$ (Pair x y) = Pair (a <$ x) (a <$ y)
 
 -- | @since 4.9.0.0
 instance (Foldable f, Foldable g) => Foldable (Product f g) where
diff --git a/Data/Functor/Sum.hs b/Data/Functor/Sum.hs
--- a/Data/Functor/Sum.hs
+++ b/Data/Functor/Sum.hs
@@ -85,6 +85,9 @@
     fmap f (InL x) = InL (fmap f x)
     fmap f (InR y) = InR (fmap f y)
 
+    a <$ (InL x) = InL (a <$ x)
+    a <$ (InR y) = InR (a <$ y)
+
 -- | @since 4.9.0.0
 instance (Foldable f, Foldable g) => Foldable (Sum f g) where
     foldMap f (InL x) = foldMap f x
diff --git a/Data/Ix.hs b/Data/Ix.hs
--- a/Data/Ix.hs
+++ b/Data/Ix.hs
@@ -61,4 +61,4 @@
 
     ) where
 
-import GHC.Arr
+import GHC.Ix
diff --git a/Data/OldList.hs b/Data/OldList.hs
--- a/Data/OldList.hs
+++ b/Data/OldList.hs
@@ -241,9 +241,9 @@
 dropWhileEnd :: (a -> Bool) -> [a] -> [a]
 dropWhileEnd p = foldr (\x xs -> if p x && null xs then [] else x : xs) []
 
--- | /O(min(m,n))/. The 'stripPrefix' function drops the given prefix from a
--- list. It returns 'Nothing' if the list did not start with the prefix given,
--- or 'Just' the list after the prefix, if it does.
+-- | \(\mathcal{O}(\min(m,n))\). The 'stripPrefix' function drops the given
+-- prefix from a list. It returns 'Nothing' if the list did not start with the
+-- prefix given, or 'Just' the list after the prefix, if it does.
 --
 -- >>> stripPrefix "foo" "foobar"
 -- Just "bar"
@@ -319,8 +319,8 @@
   in foldr go (\_ -> n) ls 0#
 #endif  /* USE_REPORT_PRELUDE */
 
--- | /O(min(m,n))/. The 'isPrefixOf' function takes two lists and returns 'True'
--- iff the first list is a prefix of the second.
+-- | \(\mathcal{O}(\min(m,n))\). The 'isPrefixOf' function takes two lists and
+-- returns 'True' iff the first list is a prefix of the second.
 --
 -- >>> "Hello" `isPrefixOf` "Hello World!"
 -- True
@@ -388,11 +388,10 @@
 isInfixOf               :: (Eq a) => [a] -> [a] -> Bool
 isInfixOf needle haystack = any (isPrefixOf needle) (tails haystack)
 
--- | /O(n^2)/. The 'nub' function removes duplicate elements from a list.
--- In particular, it keeps only the first occurrence of each element.
--- (The name 'nub' means \`essence\'.)
--- It is a special case of 'nubBy', which allows the programmer to supply
--- their own equality test.
+-- | \(\mathcal{O}(n^2)\). The 'nub' function removes duplicate elements from a
+-- list. In particular, it keeps only the first occurrence of each element. (The
+-- name 'nub' means \`essence\'.) It is a special case of 'nubBy', which allows
+-- the programmer to supply their own equality test.
 --
 -- >>> nub [1,2,3,4,3,2,1,2,4,3,5]
 -- [1,2,3,4,5]
@@ -431,8 +430,8 @@
 #endif
 
 
--- | /O(n)/. 'delete' @x@ removes the first occurrence of @x@ from its list
--- argument. For example,
+-- | \(\mathcal{O}(n)\). 'delete' @x@ removes the first occurrence of @x@ from
+-- its list argument. For example,
 --
 -- >>> delete 'a' "banana"
 -- "bnana"
@@ -442,8 +441,8 @@
 delete                  :: (Eq a) => a -> [a] -> [a]
 delete                  =  deleteBy (==)
 
--- | /O(n)/. The 'deleteBy' function behaves like 'delete', but takes a
--- user-supplied equality predicate.
+-- | \(\mathcal{O}(n)\). The 'deleteBy' function behaves like 'delete', but
+-- takes a user-supplied equality predicate.
 --
 -- >>> deleteBy (<=) 4 [1..10]
 -- [1,2,3,5,6,7,8,9,10]
@@ -509,9 +508,9 @@
 intersectBy _  _  []    =  []
 intersectBy eq xs ys    =  [x | x <- xs, any (eq x) ys]
 
--- | /O(n)/. The 'intersperse' function takes an element and a list and
--- \`intersperses\' that element between the elements of the list.
--- For example,
+-- | \(\mathcal{O}(n)\). The 'intersperse' function takes an element and a list
+-- and \`intersperses\' that element between the elements of the list. For
+-- example,
 --
 -- >>> intersperse ',' "abcde"
 -- "a,b,c,d,e"
@@ -618,18 +617,18 @@
                            where (s'',y ) = f s' x
                                  (s', ys) = mapAccumR f s xs
 
--- | /O(n)/. The 'insert' function takes an element and a list and inserts the
--- element into the list at the first position where it is less than or equal to
--- the next element. In particular, if the list is sorted before the call, the
--- result will also be sorted. It is a special case of 'insertBy', which allows
--- the programmer to supply their own comparison function.
+-- | \(\mathcal{O}(n)\). The 'insert' function takes an element and a list and
+-- inserts the element into the list at the first position where it is less than
+-- or equal to the next element. In particular, if the list is sorted before the
+-- call, the result will also be sorted. It is a special case of 'insertBy',
+-- which allows the programmer to supply their own comparison function.
 --
 -- >>> insert 4 [1,2,3,5,6,7]
 -- [1,2,3,4,5,6,7]
 insert :: Ord a => a -> [a] -> [a]
 insert e ls = insertBy (compare) e ls
 
--- | /O(n)/. The non-overloaded version of 'insert'.
+-- | \(\mathcal{O}(n)\). The non-overloaded version of 'insert'.
 insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a]
 insertBy _   x [] = [x]
 insertBy cmp x ys@(y:ys')
@@ -669,9 +668,10 @@
                                        GT -> y
                                        _  -> x
 
--- | /O(n)/. The 'genericLength' function is an overloaded version of 'length'.
--- In particular, instead of returning an 'Int', it returns any type which is an
--- instance of 'Num'. It is, however, less efficient than 'length'.
+-- | \(\mathcal{O}(n)\). The 'genericLength' function is an overloaded version
+-- of 'length'. In particular, instead of returning an 'Int', it returns any
+-- type which is an instance of 'Num'. It is, however, less efficient than
+-- 'length'.
 --
 -- >>> genericLength [1, 2, 3] :: Int
 -- 3
@@ -929,8 +929,27 @@
 
  #-}
 
+{-
+
+Note [Inline @unzipN@ functions]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The inline principle for @unzip{4,5,6,7}@ is the same as 'unzip'/'unzip3' in
+"GHC.List".
+The 'unzip'/'unzip3' functions are inlined so that the `foldr` with which they
+are defined has an opportunity to fuse.
+
+As such, since there are not any differences between 2/3-ary 'unzip' and its
+n-ary counterparts below aside from the number of arguments, the `INLINE`
+pragma should be replicated in the @unzipN@ functions below as well.
+
+-}
+
 -- | The 'unzip4' function takes a list of quadruples and returns four
 -- lists, analogous to 'unzip'.
+{-# INLINE unzip4 #-}
+-- Inline so that fusion with `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] above.
 unzip4                  :: [(a,b,c,d)] -> ([a],[b],[c],[d])
 unzip4                  =  foldr (\(a,b,c,d) ~(as,bs,cs,ds) ->
                                         (a:as,b:bs,c:cs,d:ds))
@@ -938,6 +957,9 @@
 
 -- | The 'unzip5' function takes a list of five-tuples and returns five
 -- lists, analogous to 'unzip'.
+{-# INLINE unzip5 #-}
+-- Inline so that fusion with `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] above.
 unzip5                  :: [(a,b,c,d,e)] -> ([a],[b],[c],[d],[e])
 unzip5                  =  foldr (\(a,b,c,d,e) ~(as,bs,cs,ds,es) ->
                                         (a:as,b:bs,c:cs,d:ds,e:es))
@@ -945,6 +967,9 @@
 
 -- | The 'unzip6' function takes a list of six-tuples and returns six
 -- lists, analogous to 'unzip'.
+{-# INLINE unzip6 #-}
+-- Inline so that fusion with `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] above.
 unzip6                  :: [(a,b,c,d,e,f)] -> ([a],[b],[c],[d],[e],[f])
 unzip6                  =  foldr (\(a,b,c,d,e,f) ~(as,bs,cs,ds,es,fs) ->
                                         (a:as,b:bs,c:cs,d:ds,e:es,f:fs))
@@ -952,6 +977,9 @@
 
 -- | The 'unzip7' function takes a list of seven-tuples and returns
 -- seven lists, analogous to 'unzip'.
+{-# INLINE unzip7 #-}
+-- Inline so that fusion with `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] above.
 unzip7          :: [(a,b,c,d,e,f,g)] -> ([a],[b],[c],[d],[e],[f],[g])
 unzip7          =  foldr (\(a,b,c,d,e,f,g) ~(as,bs,cs,ds,es,fs,gs) ->
                                 (a:as,b:bs,c:cs,d:ds,e:es,f:fs,g:gs))
@@ -1001,8 +1029,8 @@
 -- if it fuses with a consumer, and it would generally lead to serious
 -- loss of sharing if allowed to fuse with a producer.
 
--- | /O(n)/. The 'tails' function returns all final segments of the argument,
--- longest first.  For example,
+-- | \(\mathcal{O}(n)\). The 'tails' function returns all final segments of the
+-- argument, longest first. For example,
 --
 -- >>> tails "abc"
 -- ["abc","bc","c",""]
@@ -1057,7 +1085,7 @@
 -- It is a special case of 'sortBy', which allows the programmer to supply
 -- their own comparison function.
 --
--- Elements are arranged from from lowest to highest, keeping duplicates in
+-- Elements are arranged from lowest to highest, keeping duplicates in
 -- the order they appeared in the input.
 --
 -- >>> sort [1,6,4,3,2,5]
@@ -1084,7 +1112,7 @@
 "A smooth applicative merge sort".
 
 Benchmarks show it to be often 2x the speed of the previous implementation.
-Fixes ticket http://ghc.haskell.org/trac/ghc/ticket/2143
+Fixes ticket https://gitlab.haskell.org/ghc/ghc/issues/2143
 -}
 
 sort = sortBy compare
diff --git a/Data/Ord.hs b/Data/Ord.hs
--- a/Data/Ord.hs
+++ b/Data/Ord.hs
@@ -7,7 +7,7 @@
 -- Module      :  Data.Ord
 -- Copyright   :  (c) The University of Glasgow 2005
 -- License     :  BSD-style (see the file libraries/base/LICENSE)
--- 
+--
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  stable
 -- Portability :  portable
@@ -23,12 +23,18 @@
    comparing,
  ) where
 
+import Data.Bits (Bits, FiniteBits)
+import Foreign.Storable (Storable)
+import GHC.Ix (Ix)
 import GHC.Base
-import GHC.Show
-import GHC.Read
+import GHC.Enum (Bounded, Enum)
+import GHC.Float (Floating, RealFloat)
 import GHC.Num
+import GHC.Read
+import GHC.Real (Fractional, Integral, Real, RealFrac)
+import GHC.Show
 
--- | 
+-- |
 -- > comparing p x y = compare (p x) (p y)
 --
 -- Useful combinator for use in conjunction with the @xxxBy@ family
@@ -46,15 +52,43 @@
 -- as in: @then sortWith by 'Down' x@
 --
 -- @since 4.6.0.0
-newtype Down a = Down a
+newtype Down a = Down
+    { getDown :: a -- ^ @since 4.14.0.0
+    }
     deriving
       ( Eq        -- ^ @since 4.6.0.0
-      , Show      -- ^ @since 4.7.0.0
-      , Read      -- ^ @since 4.7.0.0
       , Num       -- ^ @since 4.11.0.0
       , Semigroup -- ^ @since 4.11.0.0
       , Monoid    -- ^ @since 4.11.0.0
+      , Bits       -- ^ @since 4.14.0.0
+      , Bounded    -- ^ @since 4.14.0.0
+      , Enum       -- ^ @since 4.14.0.0
+      , FiniteBits -- ^ @since 4.14.0.0
+      , Floating   -- ^ @since 4.14.0.0
+      , Fractional -- ^ @since 4.14.0.0
+      , Integral   -- ^ @since 4.14.0.0
+      , Ix         -- ^ @since 4.14.0.0
+      , Real       -- ^ @since 4.14.0.0
+      , RealFrac   -- ^ @since 4.14.0.0
+      , RealFloat  -- ^ @since 4.14.0.0
+      , Storable   -- ^ @since 4.14.0.0
       )
+
+-- | This instance would be equivalent to the derived instances of the
+-- 'Down' newtype if the 'getDown' field were removed
+--
+-- @since 4.7.0.0
+instance (Read a) => Read (Down a) where
+    readsPrec d = readParen (d > 10) $ \ r ->
+        [(Down x,t) | ("Down",s) <- lex r, (x,t) <- readsPrec 11 s]
+
+-- | This instance would be equivalent to the derived instances of the
+-- 'Down' newtype if the 'getDown' field were removed
+--
+-- @since 4.7.0.0
+instance (Show a) => Show (Down a) where
+    showsPrec d (Down x) = showParen (d > 10) $
+        showString "Down " . showsPrec 11 x
 
 -- | @since 4.6.0.0
 instance Ord a => Ord (Down a) where
diff --git a/Data/Semigroup/Internal.hs b/Data/Semigroup/Internal.hs
--- a/Data/Semigroup/Internal.hs
+++ b/Data/Semigroup/Internal.hs
@@ -31,7 +31,7 @@
 -- | This is a valid definition of 'stimes' for an idempotent 'Semigroup'.
 --
 -- When @x <> x = x@, this definition should be preferred, because it
--- works in /O(1)/ rather than /O(log n)/.
+-- works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\).
 stimesIdempotent :: Integral b => b -> a -> a
 stimesIdempotent n x
   | n <= 0 = errorWithoutStackTrace "stimesIdempotent: positive multiplier expected"
@@ -40,7 +40,7 @@
 -- | This is a valid definition of 'stimes' for an idempotent 'Monoid'.
 --
 -- When @mappend x x = x@, this definition should be preferred, because it
--- works in /O(1)/ rather than /O(log n)/
+-- works in \(\mathcal{O}(1)\) rather than \(\mathcal{O}(\log n)\)
 stimesIdempotentMonoid :: (Integral b, Monoid a) => b -> a -> a
 stimesIdempotentMonoid n x = case compare n 0 of
   LT -> errorWithoutStackTrace "stimesIdempotentMonoid: negative multiplier"
@@ -284,6 +284,12 @@
 
 
 -- | Monoid under '<|>'.
+--
+-- >>> getAlt (Alt (Just 12) <> Alt (Just 24))
+-- Just 12
+--
+-- >>> getAlt $ Alt Nothing <> Alt (Just 24)
+-- Just 24
 --
 -- @since 4.8.0.0
 newtype Alt f a = Alt {getAlt :: f a}
diff --git a/Data/Traversable.hs b/Data/Traversable.hs
--- a/Data/Traversable.hs
+++ b/Data/Traversable.hs
@@ -115,8 +115,13 @@
 -- 'Data.Functor.Compose.Compose' are from "Data.Functor.Identity" and
 -- "Data.Functor.Compose".
 --
--- (The naturality law is implied by parametricity.)
+-- A result of the naturality law is a purity law for 'traverse'
 --
+-- @'traverse' 'pure' = 'pure'@
+--
+-- (The naturality law is implied by parametricity and thus so is the
+-- purity law [1, p15].)
+--
 -- Instances are similar to 'Functor', e.g. given a data type
 --
 -- > data Tree a = Empty | Leaf a | Node (Tree a) a (Tree a)
@@ -140,6 +145,8 @@
 --    equivalent to traversal with a constant applicative functor
 --    ('foldMapDefault').
 --
+-- References:
+-- [1] The Essence of the Iterator Pattern, Jeremy Gibbons and Bruno C. d. S. Oliveira
 class (Functor t, Foldable t) => Traversable t where
     {-# MINIMAL traverse | sequenceA #-}
 
diff --git a/Data/Type/Coercion.hs b/Data/Type/Coercion.hs
--- a/Data/Type/Coercion.hs
+++ b/Data/Type/Coercion.hs
@@ -8,6 +8,7 @@
 {-# LANGUAGE NoImplicitPrelude   #-}
 {-# LANGUAGE PolyKinds           #-}
 {-# LANGUAGE RankNTypes          #-}
+{-# LANGUAGE MagicHash           #-}
 
 -----------------------------------------------------------------------------
 -- |
diff --git a/Data/Type/Equality.hs b/Data/Type/Equality.hs
--- a/Data/Type/Equality.hs
+++ b/Data/Type/Equality.hs
@@ -12,6 +12,7 @@
 {-# LANGUAGE FunctionalDependencies #-}
 {-# LANGUAGE DataKinds              #-}
 {-# LANGUAGE PolyKinds              #-}
+{-# LANGUAGE StandaloneKindSignatures #-}
 {-# LANGUAGE Trustworthy            #-}
 
 -----------------------------------------------------------------------------
@@ -122,7 +123,8 @@
 -- inhabited by a terminating value if and only if @a@ is the same type as @b@.
 --
 -- @since 4.10.0.0
-data (a :: k1) :~~: (b :: k2) where
+type (:~~:) :: k1 -> k2 -> Type
+data a :~~: b where
    HRefl :: a :~~: a
 
 -- | @since 4.10.0.0
@@ -163,7 +165,8 @@
 infix 4 ==
 
 -- | A type family to compute Boolean equality.
-type family (a :: k) == (b :: k) :: Bool where
+type (==) :: k -> k -> Bool
+type family a == b where
   f a == g b = f == g && a == b
   a == a = 'True
   _ == _ = 'False
diff --git a/Data/Typeable.hs b/Data/Typeable.hs
--- a/Data/Typeable.hs
+++ b/Data/Typeable.hs
@@ -33,10 +33,14 @@
 -- index, providing an interface very similar to the "Typeable" notion seen in
 -- previous releases. For the type-indexed interface, see "Type.Reflection".
 --
+-- Since GHC 7.10, all types automatically have 'Typeable' instances derived.
+-- This is in contrast to previous releases where 'Typeable' had to be
+-- explicitly derived using the @DeriveDataTypeable@ language extension.
+--
 -- Since GHC 7.8, 'Typeable' is poly-kinded. The changes required for this might
 -- break some old programs involving 'Typeable'. More details on this, including
 -- how to fix your code, can be found on the
--- <https://ghc.haskell.org/trac/ghc/wiki/GhcKinds/PolyTypeable PolyTypeable wiki page>
+-- <https://gitlab.haskell.org/ghc/ghc/wikis/ghc-kinds/poly-typeable PolyTypeable wiki page>
 --
 -----------------------------------------------------------------------------
 
diff --git a/Data/Typeable/Internal.hs b/Data/Typeable/Internal.hs
--- a/Data/Typeable/Internal.hs
+++ b/Data/Typeable/Internal.hs
@@ -18,6 +18,7 @@
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE TypeApplications #-}
 {-# LANGUAGE TypeFamilies #-}
+{-# LANGUAGE StandaloneKindSignatures #-}
 
 -----------------------------------------------------------------------------
 -- |
@@ -178,7 +179,8 @@
 
 -- | A concrete representation of a (monomorphic) type.
 -- 'TypeRep' supports reasonably efficient equality.
-data TypeRep (a :: k) where
+type TypeRep :: k -> Type
+data TypeRep a where
     -- The TypeRep of Type. See Note [Kind caching], Wrinkle 2
     TrType :: TypeRep Type
     TrTyCon :: { -- See Note [TypeRep fingerprints]
@@ -569,9 +571,7 @@
 -- in the usual case that it is scrutinized immediately. We
 -- split eqTypeRep into a worker and wrapper because otherwise
 -- it's much larger than anything we'd want to inline.
---
--- However, due to #16893 it is currently unsafe to do so, hence the NOINLINE.
-{-# NOINLINE eqTypeRep #-}
+{-# INLINABLE eqTypeRep #-}
 
 sameTypeRep :: forall k1 k2 (a :: k1) (b :: k2).
                TypeRep a -> TypeRep b -> Bool
@@ -668,10 +668,12 @@
       IntRep      -> rep @'IntRep
       Int8Rep     -> rep @'Int8Rep
       Int16Rep    -> rep @'Int16Rep
+      Int32Rep    -> rep @'Int32Rep
       Int64Rep    -> rep @'Int64Rep
       WordRep     -> rep @'WordRep
       Word8Rep    -> rep @'Word8Rep
       Word16Rep   -> rep @'Word16Rep
+      Word32Rep   -> rep @'Word32Rep
       Word64Rep   -> rep @'Word64Rep
       AddrRep     -> rep @'AddrRep
       FloatRep    -> rep @'FloatRep
@@ -832,7 +834,7 @@
 -- appropriate module and constructor names.
 --
 -- The ticket to find a better way to deal with this is
--- Trac #14480.
+-- #14480.
 tyConTYPE :: TyCon
 tyConTYPE = mkTyCon (tyConPackage liftedRepTyCon) "GHC.Prim" "TYPE" 0
        (KindRepFun (KindRepTyConApp liftedRepTyCon []) (KindRepTYPE LiftedRep))
diff --git a/Data/Version.hs b/Data/Version.hs
--- a/Data/Version.hs
+++ b/Data/Version.hs
@@ -42,7 +42,7 @@
 import Data.Char        ( isDigit, isAlphaNum )
 import Data.Eq
 import Data.Int         ( Int )
-import Data.List
+import Data.List        ( map, sort, concat, concatMap, intersperse, (++) )
 import Data.Ord
 import Data.String      ( String )
 import GHC.Generics
diff --git a/Data/Void.hs b/Data/Void.hs
--- a/Data/Void.hs
+++ b/Data/Void.hs
@@ -79,6 +79,16 @@
 -- | If 'Void' is uninhabited then any 'Functor' that holds only
 -- values of type 'Void' is holding no values.
 --
+-- Using @ApplicativeDo@: \'@'vacuous' theVoid@\' can be understood as the
+-- @do@ expression
+--
+-- @
+-- do void <- theVoid
+--    pure (absurd void)
+-- @
+--
+-- with an inferred @Functor@ constraint.
+--
 -- @since 4.8.0.0
 vacuous :: Functor f => f Void -> f a
 vacuous = fmap absurd
diff --git a/Data/Word.hs b/Data/Word.hs
--- a/Data/Word.hs
+++ b/Data/Word.hs
@@ -25,6 +25,9 @@
         -- * byte swapping
         byteSwap16, byteSwap32, byteSwap64,
 
+        -- * bit reversal
+
+        bitReverse8, bitReverse16, bitReverse32, bitReverse64
         -- * Notes
 
         -- $notes
diff --git a/Debug/Trace.hs b/Debug/Trace.hs
--- a/Debug/Trace.hs
+++ b/Debug/Trace.hs
@@ -53,7 +53,7 @@
 import GHC.Ptr
 import GHC.Show
 import GHC.Stack
-import Data.List
+import Data.List (null, partition)
 
 -- $setup
 -- >>> import Prelude
@@ -81,7 +81,7 @@
 traceIO msg = do
     withCString "%s\n" $ \cfmt -> do
      -- NB: debugBelch can't deal with null bytes, so filter them
-     -- out so we don't accidentally truncate the message.  See Trac #9395
+     -- out so we don't accidentally truncate the message.  See #9395
      let (nulls, msg') = partition (=='\0') msg
      withCString msg' $ \cmsg ->
       debugBelch cfmt cmsg
@@ -275,7 +275,7 @@
 -- When looking at a profile for the execution of a program we often want to
 -- be able to mark certain points or phases in the execution and see that
 -- visually in the profile.
-
+--
 -- For example, a program might have several distinct phases with different
 -- performance or resource behaviour in each phase. To properly interpret the
 -- profile graph we really want to see when each phase starts and ends.
diff --git a/Foreign/Ptr.hs b/Foreign/Ptr.hs
--- a/Foreign/Ptr.hs
+++ b/Foreign/Ptr.hs
@@ -110,7 +110,7 @@
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 One might expect that IntPtr, WordPtr, and the other newtypes in the
 Foreign.C.Types and System.Posix.Types modules to be abstract, but this is not
-the case in GHC (see Trac #5229 and #11983). In fact, we deliberately export
+the case in GHC (see #5229 and #11983). In fact, we deliberately export
 the constructors for these datatypes in order to satisfy a requirement of the
 Haskell 2010 Report (§ 8.4.2) that if a newtype is used in a foreign
 declaration, then its constructor must be visible.
@@ -118,7 +118,7 @@
 This requirement was motivated by the fact that using a type in a foreign
 declaration necessarily exposes some information about the type to the user,
 so being able to use abstract types in a foreign declaration breaks their
-abstraction (see Trac #3008). As a result, the constructors of all FFI-related
+abstraction (see #3008). As a result, the constructors of all FFI-related
 newtypes in base must be exported in order to be useful for FFI programming,
 even at the cost of exposing their underlying, architecture-dependent types.
 -}
diff --git a/GHC/Arr.hs b/GHC/Arr.hs
--- a/GHC/Arr.hs
+++ b/GHC/Arr.hs
@@ -20,7 +20,6 @@
 module GHC.Arr (
         Ix(..), Array(..), STArray(..),
 
-        indexError, hopelessIndexError,
         arrEleBottom, array, listArray,
         (!), safeRangeSize, negRange, safeIndex, badSafeIndex,
         bounds, numElements, numElementsSTArray, indices, elems,
@@ -42,340 +41,17 @@
         unsafeFreezeSTArray, unsafeThawSTArray,
     ) where
 
-import GHC.Enum
 import GHC.Num
 import GHC.ST
 import GHC.Base
 import GHC.List
-import GHC.Real( fromIntegral )
+import GHC.Ix
 import GHC.Show
 
 infixl 9  !, //
 
 default ()
 
--- | The 'Ix' class is used to map a contiguous subrange of values in
--- a type onto integers.  It is used primarily for array indexing
--- (see the array package).
---
--- The first argument @(l,u)@ of each of these operations is a pair
--- specifying the lower and upper bounds of a contiguous subrange of values.
---
--- An implementation is entitled to assume the following laws about these
--- operations:
---
--- * @'inRange' (l,u) i == 'elem' i ('range' (l,u))@ @ @
---
--- * @'range' (l,u) '!!' 'index' (l,u) i == i@, when @'inRange' (l,u) i@
---
--- * @'map' ('index' (l,u)) ('range' (l,u))) == [0..'rangeSize' (l,u)-1]@ @ @
---
--- * @'rangeSize' (l,u) == 'length' ('range' (l,u))@ @ @
---
-class (Ord a) => Ix a where
-    {-# MINIMAL range, (index | unsafeIndex), inRange #-}
-
-    -- | The list of values in the subrange defined by a bounding pair.
-    range               :: (a,a) -> [a]
-    -- | The position of a subscript in the subrange.
-    index               :: (a,a) -> a -> Int
-    -- | Like 'index', but without checking that the value is in range.
-    unsafeIndex         :: (a,a) -> a -> Int
-    -- | Returns 'True' the given subscript lies in the range defined
-    -- the bounding pair.
-    inRange             :: (a,a) -> a -> Bool
-    -- | The size of the subrange defined by a bounding pair.
-    rangeSize           :: (a,a) -> Int
-    -- | like 'rangeSize', but without checking that the upper bound is
-    -- in range.
-    unsafeRangeSize     :: (a,a) -> Int
-
-        -- Must specify one of index, unsafeIndex
-
-        -- 'index' is typically over-ridden in instances, with essentially
-        -- the same code, but using indexError instead of hopelessIndexError
-        -- Reason: we have 'Show' at the instances
-    {-# INLINE index #-}  -- See Note [Inlining index]
-    index b i | inRange b i = unsafeIndex b i
-              | otherwise   = hopelessIndexError
-
-    unsafeIndex b i = index b i
-
-    rangeSize b@(_l,h) | inRange b h = unsafeIndex b h + 1
-                       | otherwise   = 0        -- This case is only here to
-                                                -- check for an empty range
-        -- NB: replacing (inRange b h) by (l <= h) fails for
-        --     tuples.  E.g.  (1,2) <= (2,1) but the range is empty
-
-    unsafeRangeSize b@(_l,h) = unsafeIndex b h + 1
-
-{-
-Note that the following is NOT right
-        rangeSize (l,h) | l <= h    = index b h + 1
-                        | otherwise = 0
-
-Because it might be the case that l<h, but the range
-is nevertheless empty.  Consider
-        ((1,2),(2,1))
-Here l<h, but the second index ranges from 2..1 and
-hence is empty
-
-
-Note [Inlining index]
-~~~~~~~~~~~~~~~~~~~~~
-We inline the 'index' operation,
-
- * Partly because it generates much faster code
-   (although bigger); see Trac #1216
-
- * Partly because it exposes the bounds checks to the simplifier which
-   might help a big.
-
-If you make a per-instance index method, you may consider inlining it.
-
-Note [Double bounds-checking of index values]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-When you index an array, a!x, there are two possible bounds checks we might make:
-
-  (A) Check that (inRange (bounds a) x) holds.
-
-      (A) is checked in the method for 'index'
-
-  (B) Check that (index (bounds a) x) lies in the range 0..n,
-      where n is the size of the underlying array
-
-      (B) is checked in the top-level function (!), in safeIndex.
-
-Of course it *should* be the case that (A) holds iff (B) holds, but that
-is a property of the particular instances of index, bounds, and inRange,
-so GHC cannot guarantee it.
-
- * If you do (A) and not (B), then you might get a seg-fault,
-   by indexing at some bizarre location.  Trac #1610
-
- * If you do (B) but not (A), you may get no complaint when you index
-   an array out of its semantic bounds.  Trac #2120
-
-At various times we have had (A) and not (B), or (B) and not (A); both
-led to complaints.  So now we implement *both* checks (Trac #2669).
-
-For 1-d, 2-d, and 3-d arrays of Int we have specialised instances to avoid this.
-
-Note [Out-of-bounds error messages]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-The default method for 'index' generates hoplelessIndexError, because
-Ix doesn't have Show as a superclass.  For particular base types we
-can do better, so we override the default method for index.
--}
-
--- Abstract these errors from the relevant index functions so that
--- the guts of the function will be small enough to inline.
-
-{-# NOINLINE indexError #-}
-indexError :: Show a => (a,a) -> a -> String -> b
-indexError rng i tp
-  = errorWithoutStackTrace (showString "Ix{" . showString tp . showString "}.index: Index " .
-           showParen True (showsPrec 0 i) .
-           showString " out of range " $
-           showParen True (showsPrec 0 rng) "")
-
-hopelessIndexError :: Int -- Try to use 'indexError' instead!
-hopelessIndexError = errorWithoutStackTrace "Error in array index"
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance  Ix Char  where
-    {-# INLINE range #-}
-    range (m,n) = [m..n]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex (m,_n) i = fromEnum i - fromEnum m
-
-    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
-                          -- and Note [Inlining index]
-    index b i | inRange b i =  unsafeIndex b i
-              | otherwise   =  indexError b i "Char"
-
-    inRange (m,n) i     =  m <= i && i <= n
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance  Ix Int  where
-    {-# INLINE range #-}
-        -- The INLINE stops the build in the RHS from getting inlined,
-        -- so that callers can fuse with the result of range
-    range (m,n) = [m..n]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex (m,_n) i = i - m
-
-    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
-                          -- and Note [Inlining index]
-    index b i | inRange b i =  unsafeIndex b i
-              | otherwise   =  indexError b i "Int"
-
-    {-# INLINE inRange #-}
-    inRange (I# m,I# n) (I# i) =  isTrue# (m <=# i) && isTrue# (i <=# n)
-
--- | @since 4.6.0.0
-instance Ix Word where
-    range (m,n)         = [m..n]
-    unsafeIndex (m,_) i = fromIntegral (i - m)
-    inRange (m,n) i     = m <= i && i <= n
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance  Ix Integer  where
-    {-# INLINE range #-}
-    range (m,n) = [m..n]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex (m,_n) i   = fromInteger (i - m)
-
-    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
-                          -- and Note [Inlining index]
-    index b i | inRange b i =  unsafeIndex b i
-              | otherwise   =  indexError b i "Integer"
-
-    inRange (m,n) i     =  m <= i && i <= n
-
-----------------------------------------------------------------------
--- | @since 4.8.0.0
-instance Ix Natural where
-    range (m,n) = [m..n]
-    inRange (m,n) i = m <= i && i <= n
-    unsafeIndex (m,_) i = fromIntegral (i-m)
-    index b i | inRange b i = unsafeIndex b i
-              | otherwise   = indexError b i "Natural"
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance Ix Bool where -- as derived
-    {-# INLINE range #-}
-    range (m,n) = [m..n]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex (l,_) i = fromEnum i - fromEnum l
-
-    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
-                          -- and Note [Inlining index]
-    index b i | inRange b i =  unsafeIndex b i
-              | otherwise   =  indexError b i "Bool"
-
-    inRange (l,u) i = fromEnum i >= fromEnum l && fromEnum i <= fromEnum u
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance Ix Ordering where -- as derived
-    {-# INLINE range #-}
-    range (m,n) = [m..n]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex (l,_) i = fromEnum i - fromEnum l
-
-    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
-                          -- and Note [Inlining index]
-    index b i | inRange b i =  unsafeIndex b i
-              | otherwise   =  indexError b i "Ordering"
-
-    inRange (l,u) i = fromEnum i >= fromEnum l && fromEnum i <= fromEnum u
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance Ix () where
-    {-# INLINE range #-}
-    range   ((), ())    = [()]
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex   ((), ()) () = 0
-    {-# INLINE inRange #-}
-    inRange ((), ()) () = True
-
-    {-# INLINE index #-}  -- See Note [Inlining index]
-    index b i = unsafeIndex b i
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance (Ix a, Ix b) => Ix (a, b) where -- as derived
-    {-# SPECIALISE instance Ix (Int,Int) #-}
-
-    {-# INLINE range #-}
-    range ((l1,l2),(u1,u2)) =
-      [ (i1,i2) | i1 <- range (l1,u1), i2 <- range (l2,u2) ]
-
-    {-# INLINE unsafeIndex #-}
-    unsafeIndex ((l1,l2),(u1,u2)) (i1,i2) =
-      unsafeIndex (l1,u1) i1 * unsafeRangeSize (l2,u2) + unsafeIndex (l2,u2) i2
-
-    {-# INLINE inRange #-}
-    inRange ((l1,l2),(u1,u2)) (i1,i2) =
-      inRange (l1,u1) i1 && inRange (l2,u2) i2
-
-    -- Default method for index
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance  (Ix a1, Ix a2, Ix a3) => Ix (a1,a2,a3)  where
-    {-# SPECIALISE instance Ix (Int,Int,Int) #-}
-
-    range ((l1,l2,l3),(u1,u2,u3)) =
-        [(i1,i2,i3) | i1 <- range (l1,u1),
-                      i2 <- range (l2,u2),
-                      i3 <- range (l3,u3)]
-
-    unsafeIndex ((l1,l2,l3),(u1,u2,u3)) (i1,i2,i3) =
-      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
-      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
-      unsafeIndex (l1,u1) i1))
-
-    inRange ((l1,l2,l3),(u1,u2,u3)) (i1,i2,i3) =
-      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
-      inRange (l3,u3) i3
-
-    -- Default method for index
-
-----------------------------------------------------------------------
--- | @since 2.01
-instance  (Ix a1, Ix a2, Ix a3, Ix a4) => Ix (a1,a2,a3,a4)  where
-    range ((l1,l2,l3,l4),(u1,u2,u3,u4)) =
-      [(i1,i2,i3,i4) | i1 <- range (l1,u1),
-                       i2 <- range (l2,u2),
-                       i3 <- range (l3,u3),
-                       i4 <- range (l4,u4)]
-
-    unsafeIndex ((l1,l2,l3,l4),(u1,u2,u3,u4)) (i1,i2,i3,i4) =
-      unsafeIndex (l4,u4) i4 + unsafeRangeSize (l4,u4) * (
-      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
-      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
-      unsafeIndex (l1,u1) i1)))
-
-    inRange ((l1,l2,l3,l4),(u1,u2,u3,u4)) (i1,i2,i3,i4) =
-      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
-      inRange (l3,u3) i3 && inRange (l4,u4) i4
-
-    -- Default method for index
--- | @since 2.01
-instance  (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1,a2,a3,a4,a5)  where
-    range ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) =
-      [(i1,i2,i3,i4,i5) | i1 <- range (l1,u1),
-                          i2 <- range (l2,u2),
-                          i3 <- range (l3,u3),
-                          i4 <- range (l4,u4),
-                          i5 <- range (l5,u5)]
-
-    unsafeIndex ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) (i1,i2,i3,i4,i5) =
-      unsafeIndex (l5,u5) i5 + unsafeRangeSize (l5,u5) * (
-      unsafeIndex (l4,u4) i4 + unsafeRangeSize (l4,u4) * (
-      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
-      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
-      unsafeIndex (l1,u1) i1))))
-
-    inRange ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) (i1,i2,i3,i4,i5) =
-      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
-      inRange (l3,u3) i3 && inRange (l4,u4) i4 &&
-      inRange (l5,u5) i5
-
-    -- Default method for index
-
 -- | The type of immutable non-strict (boxed) arrays
 -- with indices in @i@ and elements in @e@.
 data Array i e
@@ -787,7 +463,7 @@
 2. This implementation relies on list fusion for efficiency. In order
    to implement the "amap/coerce" rule, we need to delay inlining amap
    until simplifier phase 1, which is when the eftIntList rule kicks
-   in and makes that impossible.  (c.f. Trac #8767)
+   in and makes that impossible.  (c.f. #8767)
 -}
 
 
@@ -847,6 +523,15 @@
 -- | @since 2.01
 instance Functor (Array i) where
     fmap = amap
+
+    {-# INLINE (<$) #-}
+    x <$ Array l u n@(I# n#) _ =
+        -- Sadly we can't just use 'newSTArray' (with 'unsafeFreezeSTArray')
+        -- since that would require proof that the indices of the original array
+        -- are instances of 'Ix'.
+        runST $ ST $ \s1# ->
+            case newArray# n# x s1# of
+                (# s2#, marr# #) -> done l u n marr# s2#
 
 -- | @since 2.01
 instance (Ix i, Eq e) => Eq (Array i e) where
diff --git a/GHC/Base.hs b/GHC/Base.hs
--- a/GHC/Base.hs
+++ b/GHC/Base.hs
@@ -116,7 +116,7 @@
         module GHC.Magic,
         module GHC.Types,
         module GHC.Prim,        -- Re-export GHC.Prim and [boot] GHC.Err,
-                                -- to avoid lots of people having to
+        module GHC.Prim.Ext,    -- to avoid lots of people having to
         module GHC.Err,         -- import it explicitly
         module GHC.Maybe
   )
@@ -127,9 +127,10 @@
 import GHC.CString
 import GHC.Magic
 import GHC.Prim
+import GHC.Prim.Ext
 import GHC.Err
 import GHC.Maybe
-import {-# SOURCE #-} GHC.IO (failIO,mplusIO)
+import {-# SOURCE #-} GHC.IO (mkUserError, mplusIO)
 
 import GHC.Tuple ()              -- Note [Depend on GHC.Tuple]
 import GHC.Integer ()            -- Note [Depend on GHC.Integer]
@@ -220,6 +221,9 @@
 -- @since 4.9.0.0
 class Semigroup a where
         -- | An associative operation.
+        --
+        -- >>> [1,2,3] <> [4,5,6]
+        -- [1,2,3,4,5,6]
         (<>) :: a -> a -> a
 
         -- | Reduce a non-empty list with '<>'
@@ -227,6 +231,9 @@
         -- The default definition should be sufficient, but this can be
         -- overridden for efficiency.
         --
+        -- >>> import Data.List.NonEmpty
+        -- >>> sconcat $ "Hello" :| [" ", "Haskell", "!"]
+        -- "Hello Haskell!"
         sconcat :: NonEmpty a -> a
         sconcat (a :| as) = go a as where
           go b (c:cs) = b <> go c cs
@@ -239,9 +246,12 @@
         -- will do so.
         --
         -- By making this a member of the class, idempotent semigroups
-        -- and monoids can upgrade this to execute in /O(1)/ by
+        -- and monoids can upgrade this to execute in \(\mathcal{O}(1)\) by
         -- picking @stimes = 'Data.Semigroup.stimesIdempotent'@ or @stimes =
         -- 'stimesIdempotentMonoid'@ respectively.
+        --
+        -- >>> stimes 4 [1]
+        -- [1,1,1,1]
         stimes :: Integral b => b -> a -> a
         stimes = stimesDefault
 
@@ -265,12 +275,18 @@
 -- __NOTE__: 'Semigroup' is a superclass of 'Monoid' since /base-4.11.0.0/.
 class Semigroup a => Monoid a where
         -- | Identity of 'mappend'
+        --
+        -- >>> "Hello world" <> mempty
+        -- "Hello world"
         mempty  :: a
 
         -- | An associative operation
         --
         -- __NOTE__: This method is redundant and has the default
         -- implementation @'mappend' = ('<>')@ since /base-4.11.0.0/.
+        -- Should it be implemented manually, since 'mappend' is a synonym for
+        -- ('<>'), it is expected that the two functions are defined the same
+        -- way. In a future GHC release 'mappend' will be removed from 'Monoid'.
         mappend :: a -> a -> a
         mappend = (<>)
         {-# INLINE mappend #-}
@@ -280,6 +296,9 @@
         -- For most types, the default definition for 'mconcat' will be
         -- used, but the function is included in the class definition so
         -- that an optimized version can be provided for specific types.
+        --
+        -- >>> mconcat ["Hello", " ", "Haskell", "!"]
+        -- "Hello Haskell!"
         mconcat :: [a] -> a
         mconcat = foldr mappend mempty
 
@@ -433,6 +452,32 @@
 instance Monoid a => Monad ((,) a) where
     (u, a) >>= k = case k a of (v, b) -> (u <> v, b)
 
+-- | @since 4.14.0.0
+instance Functor ((,,) a b) where
+    fmap f (a, b, c) = (a, b, f c)
+
+-- | @since 4.14.0.0
+instance (Monoid a, Monoid b) => Applicative ((,,) a b) where
+    pure x = (mempty, mempty, x)
+    (a, b, f) <*> (a', b', x) = (a <> a', b <> b', f x)
+
+-- | @since 4.14.0.0
+instance (Monoid a, Monoid b) => Monad ((,,) a b) where
+    (u, v, a) >>= k = case k a of (u', v', b) -> (u <> u', v <> v', b)
+
+-- | @since 4.14.0.0
+instance Functor ((,,,) a b c) where
+    fmap f (a, b, c, d) = (a, b, c, f d)
+
+-- | @since 4.14.0.0
+instance (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) where
+    pure x = (mempty, mempty, mempty, x)
+    (a, b, c, f) <*> (a', b', c', x) = (a <> a', b <> b', c <> c', f x)
+
+-- | @since 4.14.0.0
+instance (Monoid a, Monoid b, Monoid c) => Monad ((,,,) a b c) where
+    (u, v, w, a) >>= k = case k a of (u', v', w', b) -> (u <> u', v <> v', w <> w', b)
+
 -- | @since 4.10.0.0
 instance Semigroup a => Semigroup (IO a) where
     (<>) = liftA2 (<>)
@@ -453,11 +498,30 @@
 -}
 
 class  Functor f  where
+    -- | Using @ApplicativeDo@: \'@'fmap' f as@\' can be understood as
+    -- the @do@ expression
+    --
+    -- @
+    -- do a <- as
+    --    pure (f a)
+    -- @
+    --
+    -- with an inferred @Functor@ constraint.
     fmap        :: (a -> b) -> f a -> f b
 
     -- | Replace all locations in the input with the same value.
     -- The default definition is @'fmap' . 'const'@, but this may be
     -- overridden with a more efficient version.
+    --
+    -- Using @ApplicativeDo@: \'@a '<$' bs@\' can be understood as the
+    -- @do@ expression
+    --
+    -- @
+    -- do bs
+    --    pure a
+    -- @
+    --
+    -- with an inferred @Functor@ constraint.
     (<$)        :: a -> f b -> f a
     (<$)        =  fmap . const
 
@@ -519,7 +583,7 @@
 --
 --   * @'pure' = 'return'@
 --
---   * @('<*>') = 'ap'@
+--   * @m1 '<*>' m2 = m1 '>>=' (\x1 -> m2 '>>=' (\x2 -> 'return' (x1 x2)))@
 --
 --   * @('*>') = ('>>')@
 --
@@ -534,6 +598,15 @@
     --
     -- A few functors support an implementation of '<*>' that is more
     -- efficient than the default one.
+    --
+    -- Using @ApplicativeDo@: \'@fs '<*>' as@\' can be understood as
+    -- the @do@ expression
+    --
+    -- @
+    -- do f <- fs
+    --    a <- as
+    --    pure (f a)
+    -- @
     (<*>) :: f (a -> b) -> f a -> f b
     (<*>) = liftA2 id
 
@@ -543,10 +616,40 @@
     -- efficient than the default one. In particular, if 'fmap' is an
     -- expensive operation, it is likely better to use 'liftA2' than to
     -- 'fmap' over the structure and then use '<*>'.
+    --
+    -- This became a typeclass method in 4.10.0.0. Prior to that, it was
+    -- a function defined in terms of '<*>' and 'fmap'.
+    --
+    -- Using @ApplicativeDo@: \'@'liftA2' f as bs@\' can be understood
+    -- as the @do@ expression
+    --
+    -- @
+    -- do a <- as
+    --    b <- bs
+    --    pure (f a b)
+    -- @
+
     liftA2 :: (a -> b -> c) -> f a -> f b -> f c
     liftA2 f x = (<*>) (fmap f x)
 
     -- | Sequence actions, discarding the value of the first argument.
+    --
+    -- \'@as '*>' bs@\' can be understood as the @do@ expression
+    --
+    -- @
+    -- do as
+    --    bs
+    -- @
+    --
+    -- This is a tad complicated for our @ApplicativeDo@ extension
+    -- which will give it a @Monad@ constraint. For an @Applicative@
+    -- constraint we write it of the form
+    --
+    -- @
+    -- do _ <- as
+    --    b <- bs
+    --    pure b
+    -- @
     (*>) :: f a -> f b -> f b
     a1 *> a2 = (id <$ a1) <*> a2
     -- This is essentially the same as liftA2 (flip const), but if the
@@ -559,22 +662,61 @@
     -- liftA2, it would likely be better to define (*>) using liftA2.
 
     -- | Sequence actions, discarding the value of the second argument.
+    --
+    -- Using @ApplicativeDo@: \'@as '<*' bs@\' can be understood as
+    -- the @do@ expression
+    --
+    -- @
+    -- do a <- as
+    --    bs
+    --    pure a
+    -- @
     (<*) :: f a -> f b -> f a
     (<*) = liftA2 const
 
 -- | A variant of '<*>' with the arguments reversed.
+--
+-- Using @ApplicativeDo@: \'@as '<**>' fs@\' can be understood as the
+-- @do@ expression
+--
+-- @
+-- do a <- as
+--    f <- fs
+--    pure (f a)
+-- @
 (<**>) :: Applicative f => f a -> f (a -> b) -> f b
 (<**>) = liftA2 (\a f -> f a)
 -- Don't use $ here, see the note at the top of the page
 
 -- | Lift a function to actions.
 -- This function may be used as a value for `fmap` in a `Functor` instance.
+--
+-- | Using @ApplicativeDo@: \'@'liftA' f as@\' can be understood as the
+-- @do@ expression
+--
+--
+-- @
+-- do a <- as
+--    pure (f a)
+-- @
+--
+-- with an inferred @Functor@ constraint, weaker than @Applicative@.
 liftA :: Applicative f => (a -> b) -> f a -> f b
 liftA f a = pure f <*> a
 -- Caution: since this may be used for `fmap`, we can't use the obvious
 -- definition of liftA = fmap.
 
 -- | Lift a ternary function to actions.
+--
+-- Using @ApplicativeDo@: \'@'liftA3' f as bs cs@\' can be understood
+-- as the @do@ expression
+--
+-- @
+-- do a <- as
+--    b <- bs
+--    c <- cs
+--    pure (f a b c)
+-- @
 liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d
 liftA3 f a b c = liftA2 f a b <*> c
 
@@ -591,6 +733,14 @@
 -- is used to remove one level of monadic structure, projecting its
 -- bound argument into the outer level.
 --
+--
+-- \'@'join' bss@\' can be understood as the @do@ expression
+--
+-- @
+-- do bs <- bss
+--    bs
+-- @
+--
 -- ==== __Examples__
 --
 -- A common use of 'join' is to run an 'IO' computation returned from
@@ -636,7 +786,7 @@
 Furthermore, the 'Monad' and 'Applicative' operations should relate as follows:
 
 * @'pure' = 'return'@
-* @('<*>') = 'ap'@
+* @m1 '<*>' m2 = m1 '>>=' (\x1 -> m2 '>>=' (\x2 -> 'return' (x1 x2)))@
 
 The above laws imply:
 
@@ -651,11 +801,25 @@
 class Applicative m => Monad m where
     -- | Sequentially compose two actions, passing any value produced
     -- by the first as an argument to the second.
+    --
+    -- \'@as '>>=' bs@\' can be understood as the @do@ expression
+    --
+    -- @
+    -- do a <- as
+    --    bs a
+    -- @
     (>>=)       :: forall a b. m a -> (a -> m b) -> m b
 
     -- | Sequentially compose two actions, discarding any value produced
     -- by the first, like sequencing operators (such as the semicolon)
     -- in imperative languages.
+    --
+    -- \'@as '>>' bs@\' can be understood as the @do@ expression
+    --
+    -- @
+    -- do as
+    --    bs
+    -- @
     (>>)        :: forall a b. m a -> m b -> m b
     m >> k = m >>= \_ -> k -- See Note [Recursive bindings for Applicative/Monad]
     {-# INLINE (>>) #-}
@@ -806,7 +970,7 @@
     fmap = (.)
 
 -- | @since 2.01
-instance Applicative ((->) a) where
+instance Applicative ((->) r) where
     pure = const
     (<*>) f g x = f x (g x)
     liftA2 q f g x = q (f x) (g x)
@@ -1080,8 +1244,8 @@
 --              map
 ----------------------------------------------
 
--- | /O(n)/. 'map' @f xs@ is the list obtained by applying @f@ to each element
--- of @xs@, i.e.,
+-- | \(\mathcal{O}(n)\). 'map' @f xs@ is the list obtained by applying @f@ to
+-- each element of @xs@, i.e.,
 --
 -- > map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
 -- > map f [x1, x2, ...] == [f x1, f x2, ...]
@@ -1150,7 +1314,6 @@
 
 {-# RULES "map/coerce" [1] map coerce = coerce #-}
 
-
 ----------------------------------------------
 --              append
 ----------------------------------------------
@@ -1189,6 +1352,7 @@
 -- | A 'String' is a list of characters.  String constants in Haskell are values
 -- of type 'String'.
 --
+-- See "Data.List" for operations on lists.
 type String = [Char]
 
 unsafeChr :: Int -> Char
@@ -1367,6 +1531,13 @@
 
 thenIO :: IO a -> IO b -> IO b
 thenIO (IO m) k = IO (\ s -> case m s of (# new_s, _ #) -> unIO k new_s)
+
+-- Note that it is import that we do not SOURCE import this as
+-- its demand signature encodes knowledge of its bottoming
+-- behavior, which can expose useful simplifications. See
+-- #16588.
+failIO :: String -> IO a
+failIO s = IO (raiseIO# (mkUserError s))
 
 unIO :: IO a -> (State# RealWorld -> (# State# RealWorld, a #))
 unIO (IO a) = a
diff --git a/GHC/ByteOrder.hs b/GHC/ByteOrder.hs
--- a/GHC/ByteOrder.hs
+++ b/GHC/ByteOrder.hs
@@ -17,6 +17,9 @@
 
 module GHC.ByteOrder where
 
+-- Required for WORDS_BIGENDIAN
+#include <ghcautoconf.h>
+
 -- | Byte ordering.
 data ByteOrder
     = BigEndian    -- ^ most-significant-byte occurs in lowest address.
diff --git a/GHC/Conc/Sync.hs b/GHC/Conc/Sync.hs
--- a/GHC/Conc/Sync.hs
+++ b/GHC/Conc/Sync.hs
@@ -113,7 +113,7 @@
 import GHC.MVar
 import GHC.Ptr
 import GHC.Real         ( fromIntegral )
-import GHC.Show         ( Show(..), showString )
+import GHC.Show         ( Show(..), showParen, showString )
 import GHC.Stable       ( StablePtr(..) )
 import GHC.Weak
 
@@ -145,7 +145,7 @@
 
 -- | @since 4.2.0.0
 instance Show ThreadId where
-   showsPrec d t =
+   showsPrec d t = showParen (d >= 11) $
         showString "ThreadId " .
         showsPrec d (getThreadId (id2TSO t))
 
diff --git a/GHC/Err.hs b/GHC/Err.hs
--- a/GHC/Err.hs
+++ b/GHC/Err.hs
@@ -23,7 +23,6 @@
 -----------------------------------------------------------------------------
 
 module GHC.Err( absentErr, error, errorWithoutStackTrace, undefined ) where
-import GHC.CString ()
 import GHC.Types (Char, RuntimeRep)
 import GHC.Stack.Types
 import GHC.Prim
diff --git a/GHC/Event/Manager.hs b/GHC/Event/Manager.hs
--- a/GHC/Event/Manager.hs
+++ b/GHC/Event/Manager.hs
@@ -372,7 +372,7 @@
     when we register an event.
 
     For more information, please read:
-        http://ghc.haskell.org/trac/ghc/ticket/7651
+        https://gitlab.haskell.org/ghc/ghc/issues/7651
 -}
 -- | Wake up the event manager.
 wakeManager :: EventManager -> IO ()
diff --git a/GHC/Event/Poll.hsc b/GHC/Event/Poll.hsc
--- a/GHC/Event/Poll.hsc
+++ b/GHC/Event/Poll.hsc
@@ -27,7 +27,6 @@
 
 import Control.Concurrent.MVar (MVar, newMVar, swapMVar)
 import Data.Bits (Bits, FiniteBits, (.|.), (.&.))
-import Data.Word
 import Foreign.C.Types (CInt(..), CShort(..))
 import Foreign.Ptr (Ptr)
 import Foreign.Storable (Storable(..))
@@ -37,7 +36,7 @@
 import GHC.Num (Num(..))
 import GHC.Real (fromIntegral, div)
 import GHC.Show (Show)
-import System.Posix.Types (Fd(..))
+import System.Posix.Types (Fd(..), CNfds(..))
 
 import qualified GHC.Event.Array as A
 import qualified GHC.Event.Internal as E
@@ -110,7 +109,7 @@
     -- This function deals with timeouts greater than maxBound :: CInt, by
     -- looping until c_poll returns a non-zero value (0 indicates timeout
     -- expired) OR the full timeout has passed.
-    c_pollLoop :: Ptr PollFd -> (#type nfds_t) -> Int -> IO CInt
+    c_pollLoop :: Ptr PollFd -> CNfds -> Int -> IO CInt
     c_pollLoop ptr len tout
         | isShortTimeout = c_poll ptr len (fromIntegral tout)
         | otherwise = do
@@ -162,24 +161,12 @@
              , FiniteBits -- ^ @since 4.7.0.0
              )
 
--- We have to duplicate the whole enum like this in order for the
--- hsc2hs cross-compilation mode to work
-#if defined(POLLRDHUP)
 #{enum Event, Event
  , pollIn    = POLLIN
  , pollOut   = POLLOUT
- , pollRdHup = POLLRDHUP
  , pollErr   = POLLERR
  , pollHup   = POLLHUP
  }
-#else
-#{enum Event, Event
- , pollIn    = POLLIN
- , pollOut   = POLLOUT
- , pollErr   = POLLERR
- , pollHup   = POLLHUP
- }
-#endif
 
 fromEvent :: E.Event -> Event
 fromEvent e = remap E.evtRead  pollIn .|.
@@ -213,8 +200,8 @@
       #{poke struct pollfd, revents} ptr (pfdRevents p)
 
 foreign import ccall safe "poll.h poll"
-    c_poll :: Ptr PollFd -> (#type nfds_t) -> CInt -> IO CInt
+    c_poll :: Ptr PollFd -> CNfds -> CInt -> IO CInt
 
 foreign import ccall unsafe "poll.h poll"
-    c_poll_unsafe :: Ptr PollFd -> (#type nfds_t) -> CInt -> IO CInt
+    c_poll_unsafe :: Ptr PollFd -> CNfds -> CInt -> IO CInt
 #endif /* defined(HAVE_POLL_H) */
diff --git a/GHC/Exts.hs b/GHC/Exts.hs
--- a/GHC/Exts.hs
+++ b/GHC/Exts.hs
@@ -29,6 +29,7 @@
 
         -- * Primitive operations
         module GHC.Prim,
+        module GHC.Prim.Ext,
         shiftL#, shiftRL#, iShiftL#, iShiftRA#, iShiftRL#,
         uncheckedShiftL64#, uncheckedShiftRL64#,
         uncheckedIShiftL64#, uncheckedIShiftRA64#,
@@ -37,6 +38,14 @@
         -- * Compat wrapper
         atomicModifyMutVar#,
 
+        -- * Resize functions
+        --
+        -- | Resizing arrays of boxed elements is currently handled in
+        -- library space (rather than being a primop) since there is not
+        -- an efficient way to grow arrays. However, resize operations
+        -- may become primops in a future release of GHC.
+        resizeSmallMutableArray#,
+
         -- * Fusion
         build, augment,
 
@@ -89,6 +98,7 @@
 
 import GHC.Prim hiding ( coerce, TYPE )
 import qualified GHC.Prim
+import qualified GHC.Prim.Ext
 import GHC.Base hiding ( coerce )
 import GHC.Word
 import GHC.Int
@@ -103,6 +113,8 @@
 import Data.Version ( Version(..), makeVersion )
 import qualified Debug.Trace
 
+import Control.Applicative (ZipList(..))
+
 -- XXX This should really be in Data.Tuple, where the definitions are
 maxTupleSize :: Int
 maxTupleSize = 62
@@ -199,6 +211,12 @@
   fromList = id
   toList = id
 
+-- | @since 4.15.0.0
+instance IsList (ZipList a) where
+  type Item (ZipList a) = a
+  fromList = ZipList
+  toList = getZipList
+
 -- | @since 4.9.0.0
 instance IsList (NonEmpty a) where
   type Item (NonEmpty a) = a
@@ -246,3 +264,34 @@
 atomicModifyMutVar# mv f s =
   case unsafeCoerce# (atomicModifyMutVar2# mv f s) of
     (# s', _, ~(_, res) #) -> (# s', res #)
+
+-- | Resize a mutable array to new specified size. The returned
+-- 'SmallMutableArray#' is either the original 'SmallMutableArray#'
+-- resized in-place or, if not possible, a newly allocated
+-- 'SmallMutableArray#' with the original content copied over.
+--
+-- To avoid undefined behaviour, the original 'SmallMutableArray#' shall
+-- not be accessed anymore after a 'resizeSmallMutableArray#' has been
+-- performed. Moreover, no reference to the old one should be kept in order
+-- to allow garbage collection of the original 'SmallMutableArray#'  in
+-- case a new 'SmallMutableArray#' had to be allocated.
+--
+-- @since 4.14.0.0
+resizeSmallMutableArray#
+  :: SmallMutableArray# s a -- ^ Array to resize
+  -> Int# -- ^ New size of array
+  -> a
+     -- ^ Newly created slots initialized to this element.
+     -- Only used when array is grown.
+  -> State# s
+  -> (# State# s, SmallMutableArray# s a #)
+resizeSmallMutableArray# arr0 szNew a s0 =
+  case getSizeofSmallMutableArray# arr0 s0 of
+    (# s1, szOld #) -> if isTrue# (szNew <# szOld)
+      then case shrinkSmallMutableArray# arr0 szNew s1 of
+        s2 -> (# s2, arr0 #)
+      else if isTrue# (szNew ># szOld)
+        then case newSmallArray# szNew a s1 of
+          (# s2, arr1 #) -> case copySmallMutableArray# arr0 0# arr1 0# szOld s2 of
+            s3 -> (# s3, arr1 #)
+        else (# s1, arr0 #)
diff --git a/GHC/Float.hs b/GHC/Float.hs
--- a/GHC/Float.hs
+++ b/GHC/Float.hs
@@ -1140,13 +1140,16 @@
 ltFloat     (F# x) (F# y) = isTrue# (ltFloat# x y)
 leFloat     (F# x) (F# y) = isTrue# (leFloat# x y)
 
-expFloat, logFloat, sqrtFloat, fabsFloat :: Float -> Float
+expFloat, expm1Float :: Float -> Float
+logFloat, log1pFloat, sqrtFloat, fabsFloat :: Float -> Float
 sinFloat, cosFloat, tanFloat  :: Float -> Float
 asinFloat, acosFloat, atanFloat  :: Float -> Float
 sinhFloat, coshFloat, tanhFloat  :: Float -> Float
 asinhFloat, acoshFloat, atanhFloat  :: Float -> Float
 expFloat    (F# x) = F# (expFloat# x)
+expm1Float  (F# x) = F# (expm1Float# x)
 logFloat    (F# x) = F# (logFloat# x)
+log1pFloat  (F# x) = F# (log1pFloat# x)
 sqrtFloat   (F# x) = F# (sqrtFloat# x)
 fabsFloat   (F# x) = F# (fabsFloat# x)
 sinFloat    (F# x) = F# (sinFloat# x)
@@ -1189,13 +1192,16 @@
 float2Double :: Float -> Double
 float2Double (F# x) = D# (float2Double# x)
 
-expDouble, logDouble, sqrtDouble, fabsDouble :: Double -> Double
+expDouble, expm1Double :: Double -> Double
+logDouble, log1pDouble, sqrtDouble, fabsDouble :: Double -> Double
 sinDouble, cosDouble, tanDouble  :: Double -> Double
 asinDouble, acosDouble, atanDouble  :: Double -> Double
 sinhDouble, coshDouble, tanhDouble  :: Double -> Double
 asinhDouble, acoshDouble, atanhDouble  :: Double -> Double
 expDouble    (D# x) = D# (expDouble# x)
+expm1Double  (D# x) = D# (expm1Double# x)
 logDouble    (D# x) = D# (logDouble# x)
+log1pDouble  (D# x) = D# (log1pDouble# x)
 sqrtDouble   (D# x) = D# (sqrtDouble# x)
 fabsDouble   (D# x) = D# (fabsDouble# x)
 sinDouble    (D# x) = D# (sinDouble# x)
@@ -1226,17 +1232,7 @@
 foreign import ccall unsafe "isDoubleNegativeZero" isDoubleNegativeZero :: Double -> Int
 foreign import ccall unsafe "isDoubleFinite" isDoubleFinite :: Double -> Int
 
-
 ------------------------------------------------------------------------
--- libm imports for extended floating
-------------------------------------------------------------------------
-foreign import capi unsafe "math.h log1p" log1pDouble :: Double -> Double
-foreign import capi unsafe "math.h expm1" expm1Double :: Double -> Double
-foreign import capi unsafe "math.h log1pf" log1pFloat :: Float -> Float
-foreign import capi unsafe "math.h expm1f" expm1Float :: Float -> Float
-
-
-------------------------------------------------------------------------
 -- Coercion rules
 ------------------------------------------------------------------------
 
@@ -1294,7 +1290,7 @@
 The running time of the program goes from 120 seconds to 0.198 seconds
 with the native backend, and 0.143 seconds with the C backend.
 
-A few more details in Trac #2251, and the patch message
+A few more details in #2251, and the patch message
 "Add RULES for realToFrac from Int".
 -}
 
@@ -1324,7 +1320,7 @@
 Note [Casting from integral to floating point types]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 To implement something like `reinterpret_cast` from C++ to go from a
-floating-point type to an integral type one might niavely think that the
+floating-point type to an integral type one might naively think that the
 following should work:
 
       cast :: Float -> Word32
@@ -1387,7 +1383,7 @@
 #endif
 
 
--- | @'castFloatToWord32' f@ does a bit-for-bit copy from a floating-point value
+-- | @'castFloatToWord64' f@ does a bit-for-bit copy from a floating-point value
 -- to an integral value.
 --
 -- @since 4.10.0.0
diff --git a/GHC/ForeignPtr.hs b/GHC/ForeignPtr.hs
--- a/GHC/ForeignPtr.hs
+++ b/GHC/ForeignPtr.hs
@@ -25,6 +25,7 @@
   (
         ForeignPtr(..),
         ForeignPtrContents(..),
+        Finalizers(..),
         FinalizerPtr,
         FinalizerEnvPtr,
         newForeignPtr_,
@@ -250,7 +251,7 @@
      }
 
 addForeignPtrFinalizer :: FinalizerPtr a -> ForeignPtr a -> IO ()
--- ^This function adds a finalizer to the given foreign object.  The
+-- ^ This function adds a finalizer to the given foreign object.  The
 -- finalizer will run /before/ all other finalizers for the same
 -- object which have already been registered.
 addForeignPtrFinalizer (FunPtr fp) (ForeignPtr p c) = case c of
@@ -269,10 +270,8 @@
 
 addForeignPtrFinalizerEnv ::
   FinalizerEnvPtr env a -> Ptr env -> ForeignPtr a -> IO ()
--- ^ Like 'addForeignPtrFinalizerEnv' but allows the finalizer to be
--- passed an additional environment parameter to be passed to the
--- finalizer.  The environment passed to the finalizer is fixed by the
--- second argument to 'addForeignPtrFinalizerEnv'
+-- ^ Like 'addForeignPtrFinalizer' but the finalizer is passed an additional
+-- environment parameter.
 addForeignPtrFinalizerEnv (FunPtr fp) (Ptr ep) (ForeignPtr p c) = case c of
   PlainForeignPtr r -> insertCFinalizer r fp 1# ep p ()
   MallocPtr     _ r -> insertCFinalizer r fp 1# ep p c
diff --git a/GHC/Generics.hs b/GHC/Generics.hs
--- a/GHC/Generics.hs
+++ b/GHC/Generics.hs
@@ -736,7 +736,7 @@
 import GHC.Types
 
 -- Needed for instances
-import GHC.Arr     ( Ix )
+import GHC.Ix      ( Ix )
 import GHC.Base    ( Alternative(..), Applicative(..), Functor(..)
                    , Monad(..), MonadPlus(..), NonEmpty(..), String, coerce
                    , Semigroup(..), Monoid(..) )
diff --git a/GHC/IO.hs b/GHC/IO.hs
--- a/GHC/IO.hs
+++ b/GHC/IO.hs
@@ -24,7 +24,7 @@
 -----------------------------------------------------------------------------
 
 module GHC.IO (
-        IO(..), unIO, failIO, liftIO, mplusIO,
+        IO(..), unIO, liftIO, mplusIO,
         unsafePerformIO, unsafeInterleaveIO,
         unsafeDupablePerformIO, unsafeDupableInterleaveIO,
         noDuplicate,
@@ -38,7 +38,8 @@
         mask, mask_, uninterruptibleMask, uninterruptibleMask_,
         MaskingState(..), getMaskingState,
         unsafeUnmask, interruptible,
-        onException, bracket, finally, evaluate
+        onException, bracket, finally, evaluate,
+        mkUserError
     ) where
 
 import GHC.Base
@@ -78,9 +79,6 @@
 liftIO :: IO a -> State# RealWorld -> STret RealWorld a
 liftIO (IO m) = \s -> case m s of (# s', r #) -> STret s' r
 
-failIO :: String -> IO a
-failIO s = IO (raiseIO# (toException (userError s)))
-
 -- ---------------------------------------------------------------------------
 -- Coercions between IO and ST
 
@@ -440,7 +438,7 @@
 {- $exceptions_and_strictness
 
 Laziness can interact with @catch@-like operations in non-obvious ways (see,
-e.g. GHC Trac #11555 and #13330). For instance, consider these subtly-different
+e.g. GHC #11555 and #13330). For instance, consider these subtly-different
 examples:
 
 > test1 = Control.Exception.catch (error "uh oh") (\(_ :: SomeException) -> putStrLn "it failed")
@@ -457,3 +455,7 @@
 results, all of the @catch@ and @handle@ variants offered by "Control.Exception"
 use 'catch' rather than 'catchException'.
 -}
+
+-- For SOURCE import by GHC.Base to define failIO.
+mkUserError       :: [Char]  -> SomeException
+mkUserError str   = toException (userError str)
diff --git a/GHC/IO.hs-boot b/GHC/IO.hs-boot
--- a/GHC/IO.hs-boot
+++ b/GHC/IO.hs-boot
@@ -5,6 +5,7 @@
 
 import GHC.Types
 import GHC.Integer () -- See Note [Depend on GHC.Integer] in GHC.Base
+import {-# SOURCE #-} GHC.Exception.Type (SomeException)
 
-failIO :: [Char] -> IO a
 mplusIO :: IO a -> IO a -> IO a
+mkUserError :: [Char] -> SomeException
diff --git a/GHC/IO/Encoding/CodePage/API.hs b/GHC/IO/Encoding/CodePage/API.hs
--- a/GHC/IO/Encoding/CodePage/API.hs
+++ b/GHC/IO/Encoding/CodePage/API.hs
@@ -7,6 +7,9 @@
     mkCodePageEncoding
   ) where
 
+-- Required for WORDS_BIGENDIAN
+#include <ghcautoconf.h>
+
 import Foreign.C
 import Foreign.Ptr
 import Foreign.Marshal
diff --git a/GHC/IO/Exception.hs b/GHC/IO/Exception.hs
--- a/GHC/IO/Exception.hs
+++ b/GHC/IO/Exception.hs
@@ -178,7 +178,7 @@
 
 -- | @since 4.7.0.0
 instance Show SomeAsyncException where
-    show (SomeAsyncException e) = show e
+    showsPrec p (SomeAsyncException e) = showsPrec p e
 
 -- | @since 4.7.0.0
 instance Exception SomeAsyncException
diff --git a/GHC/IO/Handle.hs b/GHC/IO/Handle.hs
--- a/GHC/IO/Handle.hs
+++ b/GHC/IO/Handle.hs
@@ -604,7 +604,7 @@
 -- data is flushed first.
 hSetNewlineMode :: Handle -> NewlineMode -> IO ()
 hSetNewlineMode handle NewlineMode{ inputNL=i, outputNL=o } =
-  withAllHandles__ "hSetNewlineMode" handle $ \h_@Handle__{..} ->
+  withAllHandles__ "hSetNewlineMode" handle $ \h_@Handle__{} ->
     do
          flushBuffer h_
          return h_{ haInputNL=i, haOutputNL=o }
@@ -705,7 +705,7 @@
             -> Maybe HandleFinalizer
             -> IO Handle__
 dupHandleTo filepath h other_side
-            hto_@Handle__{haDevice=devTo,..}
+            hto_@Handle__{haDevice=devTo}
             h_@Handle__{haDevice=dev} mb_finalizer = do
   flushBuffer h_
   case cast devTo of
diff --git a/GHC/IO/Handle/Lock.hs b/GHC/IO/Handle/Lock.hs
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock.hs
@@ -0,0 +1,68 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE InterruptibleFFI #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module GHC.IO.Handle.Lock (
+    FileLockingNotSupported(..)
+  , LockMode(..)
+  , hLock
+  , hTryLock
+  , hUnlock
+  ) where
+
+
+#include "HsBaseConfig.h"
+
+import Data.Functor (void)
+import GHC.Base
+import GHC.IO.Handle.Lock.Common (LockMode(..), FileLockingNotSupported(..))
+import GHC.IO.Handle.Types (Handle)
+
+#if defined(mingw32_HOST_OS)
+import GHC.IO.Handle.Lock.Windows
+#elif HAVE_OFD_LOCKING
+import GHC.IO.Handle.Lock.LinuxOFD
+#elif HAVE_FLOCK
+import GHC.IO.Handle.Lock.Flock
+#else
+import GHC.IO.Handle.Lock.NoOp
+#endif
+
+-- | If a 'Handle' references a file descriptor, attempt to lock contents of the
+-- underlying file in appropriate mode. If the file is already locked in
+-- incompatible mode, this function blocks until the lock is established. The
+-- lock is automatically released upon closing a 'Handle'.
+--
+-- Things to be aware of:
+--
+-- 1) This function may block inside a C call. If it does, in order to be able
+-- to interrupt it with asynchronous exceptions and/or for other threads to
+-- continue working, you MUST use threaded version of the runtime system.
+--
+-- 2) The implementation uses 'LockFileEx' on Windows and 'flock' otherwise,
+-- hence all of their caveats also apply here.
+--
+-- 3) On non-Windows plaftorms that don't support 'flock' (e.g. Solaris) this
+-- function throws 'FileLockingNotImplemented'. We deliberately choose to not
+-- provide fcntl based locking instead because of its broken semantics.
+--
+-- @since 4.10.0.0
+hLock :: Handle -> LockMode -> IO ()
+hLock h mode = void $ lockImpl h "hLock" mode True
+
+-- | Non-blocking version of 'hLock'.
+--
+-- @since 4.10.0.0
+hTryLock :: Handle -> LockMode -> IO Bool
+hTryLock h mode = lockImpl h "hTryLock" mode False
+
+-- | Release a lock taken with 'hLock' or 'hTryLock'.
+--
+-- @since 4.11.0.0
+hUnlock :: Handle -> IO ()
+hUnlock = unlockImpl
+
+----------------------------------------
+
diff --git a/GHC/IO/Handle/Lock.hsc b/GHC/IO/Handle/Lock.hsc
deleted file mode 100644
--- a/GHC/IO/Handle/Lock.hsc
+++ /dev/null
@@ -1,266 +0,0 @@
-{-# LANGUAGE CPP #-}
-{-# LANGUAGE InterruptibleFFI #-}
-{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE MultiWayIf #-}
-{-# LANGUAGE NoImplicitPrelude #-}
-module GHC.IO.Handle.Lock (
-    FileLockingNotSupported(..)
-  , LockMode(..)
-  , hLock
-  , hTryLock
-  , hUnlock
-  ) where
-
-#include "HsBaseConfig.h"
-
-#if HAVE_FLOCK
-
-#include <sys/file.h>
-
-import Data.Bits
-import Data.Function
-import Foreign.C.Error
-import Foreign.C.Types
-import GHC.IO.Exception
-import GHC.IO.FD
-import GHC.IO.Handle.FD
-
-#elif defined(mingw32_HOST_OS)
-
-#if defined(i386_HOST_ARCH)
-## define WINDOWS_CCONV stdcall
-#elif defined(x86_64_HOST_ARCH)
-## define WINDOWS_CCONV ccall
-#else
-# error Unknown mingw32 arch
-#endif
-
-#include <windows.h>
-
-import Data.Bits
-import Data.Function
-import Foreign.C.Error
-import Foreign.C.Types
-import Foreign.Marshal.Alloc
-import Foreign.Marshal.Utils
-import GHC.IO.FD
-import GHC.IO.Handle.FD
-import GHC.Ptr
-import GHC.Windows
-
-#else
-
-import GHC.IO (throwIO)
-
-#endif
-
-import Data.Functor
-import GHC.Base
-import GHC.Exception
-import GHC.IO.Handle.Types
-import GHC.Show
-
--- | Exception thrown by 'hLock' on non-Windows platforms that don't support
--- 'flock'.
-data FileLockingNotSupported = FileLockingNotSupported
-  deriving Show -- ^ @since 4.10.0.0
-
--- ^ @since 4.10.0.0
-instance Exception FileLockingNotSupported
-
--- | Indicates a mode in which a file should be locked.
-data LockMode = SharedLock | ExclusiveLock
-
--- | If a 'Handle' references a file descriptor, attempt to lock contents of the
--- underlying file in appropriate mode. If the file is already locked in
--- incompatible mode, this function blocks until the lock is established. The
--- lock is automatically released upon closing a 'Handle'.
---
--- Things to be aware of:
---
--- 1) This function may block inside a C call. If it does, in order to be able
--- to interrupt it with asynchronous exceptions and/or for other threads to
--- continue working, you MUST use threaded version of the runtime system.
---
--- 2) The implementation uses 'LockFileEx' on Windows and 'flock' otherwise,
--- hence all of their caveats also apply here.
---
--- 3) On non-Windows plaftorms that don't support 'flock' (e.g. Solaris) this
--- function throws 'FileLockingNotImplemented'. We deliberately choose to not
--- provide fcntl based locking instead because of its broken semantics.
---
--- @since 4.10.0.0
-hLock :: Handle -> LockMode -> IO ()
-hLock h mode = void $ lockImpl h "hLock" mode True
-
--- | Non-blocking version of 'hLock'.
---
--- @since 4.10.0.0
-hTryLock :: Handle -> LockMode -> IO Bool
-hTryLock h mode = lockImpl h "hTryLock" mode False
-
--- | Release a lock taken with 'hLock' or 'hTryLock'.
---
--- @since 4.11.0.0
-hUnlock :: Handle -> IO ()
-hUnlock = unlockImpl
-
-----------------------------------------
-
-#if HAVE_OFD_LOCKING
--- Linux open file descriptor locking.
---
--- We prefer this over BSD locking (e.g. flock) since the latter appears to
--- break in some NFS configurations. Note that we intentionally do not try to
--- use ordinary POSIX file locking due to its peculiar semantics under
--- multi-threaded environments.
-
-foreign import ccall interruptible "fcntl"
-  c_fcntl :: CInt -> CInt -> Ptr () -> IO CInt
-
-data FLock  = FLock { l_type   :: CShort
-                    , l_whence :: CShort
-                    , l_start  :: COff
-                    , l_len    :: COff
-                    , l_pid    :: CPid
-                    }
-
-instance Storable FLock where
-    sizeOf _ = #{size flock}
-    alignment _ = #{alignment flock}
-    poke ptr x = do
-        fillBytes ptr 0 (sizeOf x)
-        #{poke flock, l_type}   ptr (l_type x)
-        #{poke flock, l_whence} ptr (l_whence x)
-        #{poke flock, l_start}  ptr (l_start x)
-        #{poke flock, l_len}    ptr (l_len x)
-        #{poke flock, l_pid}    ptr (l_pid x)
-    peek ptr = do
-        FLock <$> #{peek flock, l_type}   ptr
-              <*> #{peek flock, l_whence} ptr
-              <*> #{peek flock, l_start}  ptr
-              <*> #{peek flock, l_len}    ptr
-              <*> #{peek flock, l_pid}    ptr
-
-lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
-lockImpl h ctx mode block = do
-  FD{fdFD = fd} <- handleToFd h
-  with flock $ \flock_ptr -> fix $ \retry -> do
-      ret <- with flock $ fcntl fd mode flock_ptr
-      case ret of
-        0 -> return True
-        _ -> getErrno >>= \errno -> if
-          | not block && errno == eWOULDBLOCK -> return False
-          | errno == eINTR -> retry
-          | otherwise -> ioException $ errnoToIOError ctx errno (Just h) Nothing
-  where
-    flock = FLock { l_type = case mode of
-                               SharedLock -> #{const F_RDLCK}
-                               ExclusiveLock -> #{const F_WRLCK}
-                  , l_whence = #{const SEEK_SET}
-                  , l_start = 0
-                  , l_len = 0
-                  }
-    mode
-      | block     = #{const F_SETLKW}
-      | otherwise = #{const F_SETLK}
-
-unlockImpl :: Handle -> IO ()
-unlockImpl h = do
-  FD{fdFD = fd} <- handleToFd h
-  let flock = FLock { l_type = #{const F_UNLCK}
-                    , l_whence = #{const SEEK_SET}
-                    , l_start = 0
-                    , l_len = 0
-                    }
-  throwErrnoIfMinus1_ "hUnlock"
-      $ with flock $ c_fcntl fd #{const F_SETLK}
-
-#elif HAVE_FLOCK
-
-lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
-lockImpl h ctx mode block = do
-  FD{fdFD = fd} <- handleToFd h
-  let flags = cmode .|. (if block then 0 else #{const LOCK_NB})
-  fix $ \retry -> c_flock fd flags >>= \case
-    0 -> return True
-    _ -> getErrno >>= \errno -> if
-      | not block
-      , errno == eAGAIN || errno == eACCES -> return False
-      | errno == eINTR -> retry
-      | otherwise -> ioException $ errnoToIOError ctx errno (Just h) Nothing
-  where
-    cmode = case mode of
-      SharedLock    -> #{const LOCK_SH}
-      ExclusiveLock -> #{const LOCK_EX}
-
-unlockImpl :: Handle -> IO ()
-unlockImpl h = do
-  FD{fdFD = fd} <- handleToFd h
-  throwErrnoIfMinus1_ "flock" $ c_flock fd #{const LOCK_UN}
-
-foreign import ccall interruptible "flock"
-  c_flock :: CInt -> CInt -> IO CInt
-
-#elif defined(mingw32_HOST_OS)
-
-lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
-lockImpl h ctx mode block = do
-  FD{fdFD = fd} <- handleToFd h
-  wh <- throwErrnoIf (== iNVALID_HANDLE_VALUE) ctx $ c_get_osfhandle fd
-  allocaBytes sizeof_OVERLAPPED $ \ovrlpd -> do
-    fillBytes ovrlpd 0 sizeof_OVERLAPPED
-    let flags = cmode .|. (if block then 0 else #{const LOCKFILE_FAIL_IMMEDIATELY})
-    -- We want to lock the whole file without looking up its size to be
-    -- consistent with what flock does. According to documentation of LockFileEx
-    -- "locking a region that goes beyond the current end-of-file position is
-    -- not an error", hence we pass maximum value as the number of bytes to
-    -- lock.
-    fix $ \retry -> c_LockFileEx wh flags 0 0xffffffff 0xffffffff ovrlpd >>= \case
-      True  -> return True
-      False -> getLastError >>= \err -> if
-        | not block && err == #{const ERROR_LOCK_VIOLATION} -> return False
-        | err == #{const ERROR_OPERATION_ABORTED} -> retry
-        | otherwise -> failWith ctx err
-  where
-    sizeof_OVERLAPPED = #{size OVERLAPPED}
-
-    cmode = case mode of
-      SharedLock    -> 0
-      ExclusiveLock -> #{const LOCKFILE_EXCLUSIVE_LOCK}
-
-unlockImpl :: Handle -> IO ()
-unlockImpl h = do
-  FD{fdFD = fd} <- handleToFd h
-  wh <- throwErrnoIf (== iNVALID_HANDLE_VALUE) "hUnlock" $ c_get_osfhandle fd
-  allocaBytes sizeof_OVERLAPPED $ \ovrlpd -> do
-    fillBytes ovrlpd 0 sizeof_OVERLAPPED
-    c_UnlockFileEx wh 0 0xffffffff 0xffffffff ovrlpd >>= \case
-      True  -> return ()
-      False -> getLastError >>= failWith "hUnlock"
-  where
-    sizeof_OVERLAPPED = #{size OVERLAPPED}
-
--- https://msdn.microsoft.com/en-us/library/aa297958.aspx
-foreign import ccall unsafe "_get_osfhandle"
-  c_get_osfhandle :: CInt -> IO HANDLE
-
--- https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203.aspx
-foreign import WINDOWS_CCONV interruptible "LockFileEx"
-  c_LockFileEx :: HANDLE -> DWORD -> DWORD -> DWORD -> DWORD -> Ptr () -> IO BOOL
-
--- https://msdn.microsoft.com/en-us/library/windows/desktop/aa365716.aspx
-foreign import WINDOWS_CCONV interruptible "UnlockFileEx"
-  c_UnlockFileEx :: HANDLE -> DWORD -> DWORD -> DWORD -> Ptr () -> IO BOOL
-
-#else
-
--- | No-op implementation.
-lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
-lockImpl _ _ _ _ = throwIO FileLockingNotSupported
-
--- | No-op implementation.
-unlockImpl :: Handle -> IO ()
-unlockImpl _ = throwIO FileLockingNotSupported
-
-#endif
diff --git a/GHC/IO/Handle/Lock/Common.hs b/GHC/IO/Handle/Lock/Common.hs
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock/Common.hs
@@ -0,0 +1,21 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
+-- | Things common to all file locking implementations.
+module GHC.IO.Handle.Lock.Common
+  ( FileLockingNotSupported(..)
+  , LockMode(..)
+  ) where
+
+import GHC.Exception
+import GHC.Show
+
+-- | Exception thrown by 'hLock' on non-Windows platforms that don't support
+-- 'flock'.
+data FileLockingNotSupported = FileLockingNotSupported
+  deriving Show -- ^ @since 4.10.0.0
+
+-- ^ @since 4.10.0.0
+instance Exception FileLockingNotSupported
+
+-- | Indicates a mode in which a file should be locked.
+data LockMode = SharedLock | ExclusiveLock
diff --git a/GHC/IO/Handle/Lock/Flock.hsc b/GHC/IO/Handle/Lock/Flock.hsc
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock/Flock.hsc
@@ -0,0 +1,53 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE InterruptibleFFI #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+-- | File locking via POSIX @flock@.
+module GHC.IO.Handle.Lock.Flock where
+
+#include "HsBaseConfig.h"
+
+#if !HAVE_FLOCK
+import GHC.Base () -- Make implicit dependency known to build system
+#else
+
+#include <sys/file.h>
+
+import Data.Bits
+import Data.Function
+import Foreign.C.Error
+import Foreign.C.Types
+import GHC.Base
+import GHC.IO.Exception
+import GHC.IO.FD
+import GHC.IO.Handle.FD
+import GHC.IO.Handle.Lock.Common
+import GHC.IO.Handle.Types (Handle)
+
+lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
+lockImpl h ctx mode block = do
+  FD{fdFD = fd} <- handleToFd h
+  let flags = cmode .|. (if block then 0 else #{const LOCK_NB})
+  fix $ \retry -> c_flock fd flags >>= \case
+    0 -> return True
+    _ -> getErrno >>= \errno -> if
+      | not block
+      , errno == eAGAIN || errno == eACCES -> return False
+      | errno == eINTR -> retry
+      | otherwise -> ioException $ errnoToIOError ctx errno (Just h) Nothing
+  where
+    cmode = case mode of
+      SharedLock    -> #{const LOCK_SH}
+      ExclusiveLock -> #{const LOCK_EX}
+
+unlockImpl :: Handle -> IO ()
+unlockImpl h = do
+  FD{fdFD = fd} <- handleToFd h
+  throwErrnoIfMinus1_ "flock" $ c_flock fd #{const LOCK_UN}
+
+foreign import ccall interruptible "flock"
+  c_flock :: CInt -> CInt -> IO CInt
+
+#endif
diff --git a/GHC/IO/Handle/Lock/LinuxOFD.hsc b/GHC/IO/Handle/Lock/LinuxOFD.hsc
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock/LinuxOFD.hsc
@@ -0,0 +1,103 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE InterruptibleFFI #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+-- | File locking via the Linux open-fd locking mechanism.
+module GHC.IO.Handle.Lock.LinuxOFD where
+
+#include "HsBaseConfig.h"
+
+#if !HAVE_OFD_LOCKING
+import GHC.Base () -- Make implicit dependency known to build system
+#else
+
+#include <unistd.h>
+#include <fcntl.h>
+
+import Data.Function
+import Data.Functor
+import Foreign.C.Error
+import Foreign.C.Types
+import Foreign.Marshal.Utils
+import Foreign.Storable
+import GHC.Base
+import GHC.IO.Exception
+import GHC.IO.FD
+import GHC.IO.Handle.FD
+import GHC.IO.Handle.Lock.Common
+import GHC.IO.Handle.Types (Handle)
+import GHC.Ptr
+import System.Posix.Types (COff, CPid)
+
+-- Linux open file descriptor locking.
+--
+-- We prefer this over BSD locking (e.g. flock) since the latter appears to
+-- break in some NFS configurations. Note that we intentionally do not try to
+-- use ordinary POSIX file locking due to its peculiar semantics under
+-- multi-threaded environments.
+
+foreign import ccall interruptible "fcntl"
+  c_fcntl :: CInt -> CInt -> Ptr FLock -> IO CInt
+
+data FLock  = FLock { l_type   :: CShort
+                    , l_whence :: CShort
+                    , l_start  :: COff
+                    , l_len    :: COff
+                    , l_pid    :: CPid
+                    }
+
+instance Storable FLock where
+    sizeOf _ = #{size struct flock}
+    alignment _ = #{alignment struct flock}
+    poke ptr x = do
+        fillBytes ptr 0 (sizeOf x)
+        #{poke struct flock, l_type}   ptr (l_type x)
+        #{poke struct flock, l_whence} ptr (l_whence x)
+        #{poke struct flock, l_start}  ptr (l_start x)
+        #{poke struct flock, l_len}    ptr (l_len x)
+        #{poke struct flock, l_pid}    ptr (l_pid x)
+    peek ptr = do
+        FLock <$> #{peek struct flock, l_type}   ptr
+              <*> #{peek struct flock, l_whence} ptr
+              <*> #{peek struct flock, l_start}  ptr
+              <*> #{peek struct flock, l_len}    ptr
+              <*> #{peek struct flock, l_pid}    ptr
+
+lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
+lockImpl h ctx mode block = do
+  FD{fdFD = fd} <- handleToFd h
+  with flock $ \flock_ptr -> fix $ \retry -> do
+      ret <- c_fcntl fd mode' flock_ptr
+      case ret of
+        0 -> return True
+        _ -> getErrno >>= \errno -> if
+          | not block && errno == eWOULDBLOCK -> return False
+          | errno == eINTR -> retry
+          | otherwise -> ioException $ errnoToIOError ctx errno (Just h) Nothing
+  where
+    flock = FLock { l_type = case mode of
+                               SharedLock -> #{const F_RDLCK}
+                               ExclusiveLock -> #{const F_WRLCK}
+                  , l_whence = #{const SEEK_SET}
+                  , l_start = 0
+                  , l_len = 0
+                  , l_pid = 0
+                  }
+    mode'
+      | block     = #{const F_OFD_SETLKW}
+      | otherwise = #{const F_OFD_SETLK}
+
+unlockImpl :: Handle -> IO ()
+unlockImpl h = do
+  FD{fdFD = fd} <- handleToFd h
+  let flock = FLock { l_type = #{const F_UNLCK}
+                    , l_whence = #{const SEEK_SET}
+                    , l_start = 0
+                    , l_len = 0
+                    , l_pid = 0
+                    }
+  throwErrnoIfMinus1_ "hUnlock"
+      $ with flock $ c_fcntl fd #{const F_OFD_SETLK}
+
+#endif
diff --git a/GHC/IO/Handle/Lock/NoOp.hs b/GHC/IO/Handle/Lock/NoOp.hs
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock/NoOp.hs
@@ -0,0 +1,16 @@
+{-# LANGUAGE NoImplicitPrelude #-}
+
+module GHC.IO.Handle.Lock.NoOp where
+
+import GHC.Base
+import GHC.IO (throwIO)
+import GHC.IO.Handle.Lock.Common
+import GHC.IO.Handle.Types (Handle)
+
+-- | No-op implementation.
+lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
+lockImpl _ _ _ _ = throwIO FileLockingNotSupported
+
+-- | No-op implementation.
+unlockImpl :: Handle -> IO ()
+unlockImpl _ = throwIO FileLockingNotSupported
diff --git a/GHC/IO/Handle/Lock/Windows.hsc b/GHC/IO/Handle/Lock/Windows.hsc
new file mode 100644
--- /dev/null
+++ b/GHC/IO/Handle/Lock/Windows.hsc
@@ -0,0 +1,89 @@
+{-# LANGUAGE CPP #-}
+{-# LANGUAGE InterruptibleFFI #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE NoImplicitPrelude #-}
+
+-- | File locking for Windows.
+module GHC.IO.Handle.Lock.Windows where
+
+#include "HsBaseConfig.h"
+
+#if !defined(mingw32_HOST_OS)
+import GHC.Base () -- Make implicit dependency known to build system
+#else
+
+#if defined(i386_HOST_ARCH)
+## define WINDOWS_CCONV stdcall
+#elif defined(x86_64_HOST_ARCH)
+## define WINDOWS_CCONV ccall
+#else
+# error Unknown mingw32 arch
+#endif
+
+#include <windows.h>
+
+import Data.Bits
+import Data.Function
+import Foreign.C.Error
+import Foreign.C.Types
+import Foreign.Marshal.Alloc
+import Foreign.Marshal.Utils
+import GHC.Base
+import GHC.IO.FD
+import GHC.IO.Handle.FD
+import GHC.IO.Handle.Types (Handle)
+import GHC.IO.Handle.Lock.Common (LockMode(..))
+import GHC.Ptr
+import GHC.Windows
+
+lockImpl :: Handle -> String -> LockMode -> Bool -> IO Bool
+lockImpl h ctx mode block = do
+  FD{fdFD = fd} <- handleToFd h
+  wh <- throwErrnoIf (== iNVALID_HANDLE_VALUE) ctx $ c_get_osfhandle fd
+  allocaBytes sizeof_OVERLAPPED $ \ovrlpd -> do
+    fillBytes ovrlpd 0 sizeof_OVERLAPPED
+    let flags = cmode .|. (if block then 0 else #{const LOCKFILE_FAIL_IMMEDIATELY})
+    -- We want to lock the whole file without looking up its size to be
+    -- consistent with what flock does. According to documentation of LockFileEx
+    -- "locking a region that goes beyond the current end-of-file position is
+    -- not an error", hence we pass maximum value as the number of bytes to
+    -- lock.
+    fix $ \retry -> c_LockFileEx wh flags 0 0xffffffff 0xffffffff ovrlpd >>= \case
+      True  -> return True
+      False -> getLastError >>= \err -> if
+        | not block && err == #{const ERROR_LOCK_VIOLATION} -> return False
+        | err == #{const ERROR_OPERATION_ABORTED} -> retry
+        | otherwise -> failWith ctx err
+  where
+    sizeof_OVERLAPPED = #{size OVERLAPPED}
+
+    cmode = case mode of
+      SharedLock    -> 0
+      ExclusiveLock -> #{const LOCKFILE_EXCLUSIVE_LOCK}
+
+unlockImpl :: Handle -> IO ()
+unlockImpl h = do
+  FD{fdFD = fd} <- handleToFd h
+  wh <- throwErrnoIf (== iNVALID_HANDLE_VALUE) "hUnlock" $ c_get_osfhandle fd
+  allocaBytes sizeof_OVERLAPPED $ \ovrlpd -> do
+    fillBytes ovrlpd 0 sizeof_OVERLAPPED
+    c_UnlockFileEx wh 0 0xffffffff 0xffffffff ovrlpd >>= \case
+      True  -> return ()
+      False -> getLastError >>= failWith "hUnlock"
+  where
+    sizeof_OVERLAPPED = #{size OVERLAPPED}
+
+-- https://msdn.microsoft.com/en-us/library/aa297958.aspx
+foreign import ccall unsafe "_get_osfhandle"
+  c_get_osfhandle :: CInt -> IO HANDLE
+
+-- https://msdn.microsoft.com/en-us/library/windows/desktop/aa365203.aspx
+foreign import WINDOWS_CCONV interruptible "LockFileEx"
+  c_LockFileEx :: HANDLE -> DWORD -> DWORD -> DWORD -> DWORD -> Ptr () -> IO BOOL
+
+-- https://msdn.microsoft.com/en-us/library/windows/desktop/aa365716.aspx
+foreign import WINDOWS_CCONV interruptible "UnlockFileEx"
+  c_UnlockFileEx :: HANDLE -> DWORD -> DWORD -> DWORD -> Ptr () -> IO BOOL
+
+#endif
diff --git a/GHC/Int.hs b/GHC/Int.hs
--- a/GHC/Int.hs
+++ b/GHC/Int.hs
@@ -177,6 +177,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (I8# x#) .&.   (I8# y#)   = I8# (word2Int# (int2Word# x# `and#` int2Word# y#))
     (I8# x#) .|.   (I8# y#)   = I8# (word2Int# (int2Word# x# `or#`  int2Word# y#))
@@ -211,6 +212,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Int8 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 8
     countLeadingZeros  (I8# x#) = I# (word2Int# (clz8# (int2Word# x#)))
     countTrailingZeros (I8# x#) = I# (word2Int# (ctz8# (int2Word# x#)))
@@ -381,6 +384,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (I16# x#) .&.   (I16# y#)  = I16# (word2Int# (int2Word# x# `and#` int2Word# y#))
     (I16# x#) .|.   (I16# y#)  = I16# (word2Int# (int2Word# x# `or#`  int2Word# y#))
@@ -415,6 +419,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Int16 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 16
     countLeadingZeros  (I16# x#) = I# (word2Int# (clz16# (int2Word# x#)))
     countTrailingZeros (I16# x#) = I# (word2Int# (ctz16# (int2Word# x#)))
@@ -587,6 +593,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (I32# x#) .&.   (I32# y#)  = I32# (word2Int# (int2Word# x# `and#` int2Word# y#))
     (I32# x#) .|.   (I32# y#)  = I32# (word2Int# (int2Word# x# `or#`  int2Word# y#))
@@ -622,6 +629,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Int32 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 32
     countLeadingZeros  (I32# x#) = I# (word2Int# (clz32# (int2Word# x#)))
     countTrailingZeros (I32# x#) = I# (word2Int# (ctz32# (int2Word# x#)))
@@ -825,6 +834,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (I64# x#) .&.   (I64# y#)  = I64# (word64ToInt64# (int64ToWord64# x# `and64#` int64ToWord64# y#))
     (I64# x#) .|.   (I64# y#)  = I64# (word64ToInt64# (int64ToWord64# x# `or64#`  int64ToWord64# y#))
@@ -1002,6 +1012,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (I64# x#) .&.   (I64# y#)  = I64# (word2Int# (int2Word# x# `and#` int2Word# y#))
     (I64# x#) .|.   (I64# y#)  = I64# (word2Int# (int2Word# x# `or#`  int2Word# y#))
@@ -1078,6 +1089,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Int64 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 64
 #if WORD_SIZE_IN_BITS < 64
     countLeadingZeros  (I64# x#) = I# (word2Int# (clz64# (int64ToWord64# x#)))
@@ -1135,7 +1148,7 @@
 
 {- Note [Order of tests]
 ~~~~~~~~~~~~~~~~~~~~~~~~~
-(See Trac #3065, #5161.) Suppose we had a definition like:
+(See #3065, #5161.) Suppose we had a definition like:
 
     quot x y
      | y == 0                     = divZeroError
diff --git a/GHC/Ix.hs b/GHC/Ix.hs
new file mode 100644
--- /dev/null
+++ b/GHC/Ix.hs
@@ -0,0 +1,348 @@
+{-# LANGUAGE NoImplicitPrelude, MagicHash, UnboxedTuples #-}
+{-# OPTIONS_HADDOCK not-home #-}
+
+-----------------------------------------------------------------------------
+-- |
+-- Module      :  GHC.Ix
+-- Copyright   :  (c) The University of Glasgow, 1994-2000
+-- License     :  see libraries/base/LICENSE
+--
+-- Maintainer  :  cvs-ghc@haskell.org
+-- Stability   :  internal
+-- Portability :  non-portable (GHC extensions)
+--
+-- GHC\'s Ix typeclass implementation.
+--
+-----------------------------------------------------------------------------
+
+module GHC.Ix (
+        Ix(..)
+    ) where
+
+import GHC.Enum
+import GHC.Num
+import GHC.Base
+import GHC.Real( fromIntegral )
+import GHC.Show
+
+-- | The 'Ix' class is used to map a contiguous subrange of values in
+-- a type onto integers.  It is used primarily for array indexing
+-- (see the array package).
+--
+-- The first argument @(l,u)@ of each of these operations is a pair
+-- specifying the lower and upper bounds of a contiguous subrange of values.
+--
+-- An implementation is entitled to assume the following laws about these
+-- operations:
+--
+-- * @'inRange' (l,u) i == 'elem' i ('range' (l,u))@ @ @
+--
+-- * @'range' (l,u) '!!' 'index' (l,u) i == i@, when @'inRange' (l,u) i@
+--
+-- * @'map' ('index' (l,u)) ('range' (l,u))) == [0..'rangeSize' (l,u)-1]@ @ @
+--
+-- * @'rangeSize' (l,u) == 'length' ('range' (l,u))@ @ @
+--
+class (Ord a) => Ix a where
+    {-# MINIMAL range, (index | unsafeIndex), inRange #-}
+
+    -- | The list of values in the subrange defined by a bounding pair.
+    range               :: (a,a) -> [a]
+    -- | The position of a subscript in the subrange.
+    index               :: (a,a) -> a -> Int
+    -- | Like 'index', but without checking that the value is in range.
+    unsafeIndex         :: (a,a) -> a -> Int
+    -- | Returns 'True' the given subscript lies in the range defined
+    -- the bounding pair.
+    inRange             :: (a,a) -> a -> Bool
+    -- | The size of the subrange defined by a bounding pair.
+    rangeSize           :: (a,a) -> Int
+    -- | like 'rangeSize', but without checking that the upper bound is
+    -- in range.
+    unsafeRangeSize     :: (a,a) -> Int
+
+        -- Must specify one of index, unsafeIndex
+
+        -- 'index' is typically over-ridden in instances, with essentially
+        -- the same code, but using indexError instead of hopelessIndexError
+        -- Reason: we have 'Show' at the instances
+    {-# INLINE index #-}  -- See Note [Inlining index]
+    index b i | inRange b i = unsafeIndex b i
+              | otherwise   = hopelessIndexError
+
+    unsafeIndex b i = index b i
+
+    rangeSize b@(_l,h) | inRange b h = unsafeIndex b h + 1
+                       | otherwise   = 0        -- This case is only here to
+                                                -- check for an empty range
+        -- NB: replacing (inRange b h) by (l <= h) fails for
+        --     tuples.  E.g.  (1,2) <= (2,1) but the range is empty
+
+    unsafeRangeSize b@(_l,h) = unsafeIndex b h + 1
+
+{-
+Note that the following is NOT right
+        rangeSize (l,h) | l <= h    = index b h + 1
+                        | otherwise = 0
+
+Because it might be the case that l<h, but the range
+is nevertheless empty.  Consider
+        ((1,2),(2,1))
+Here l<h, but the second index ranges from 2..1 and
+hence is empty
+
+
+Note [Inlining index]
+~~~~~~~~~~~~~~~~~~~~~
+We inline the 'index' operation,
+
+ * Partly because it generates much faster code
+   (although bigger); see #1216
+
+ * Partly because it exposes the bounds checks to the simplifier which
+   might help a big.
+
+If you make a per-instance index method, you may consider inlining it.
+
+Note [Double bounds-checking of index values]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+When you index an array, a!x, there are two possible bounds checks we might make:
+
+  (A) Check that (inRange (bounds a) x) holds.
+
+      (A) is checked in the method for 'index'
+
+  (B) Check that (index (bounds a) x) lies in the range 0..n,
+      where n is the size of the underlying array
+
+      (B) is checked in the top-level function (!), in safeIndex.
+
+Of course it *should* be the case that (A) holds iff (B) holds, but that
+is a property of the particular instances of index, bounds, and inRange,
+so GHC cannot guarantee it.
+
+ * If you do (A) and not (B), then you might get a seg-fault,
+   by indexing at some bizarre location.  #1610
+
+ * If you do (B) but not (A), you may get no complaint when you index
+   an array out of its semantic bounds.  #2120
+
+At various times we have had (A) and not (B), or (B) and not (A); both
+led to complaints.  So now we implement *both* checks (#2669).
+
+For 1-d, 2-d, and 3-d arrays of Int we have specialised instances to avoid this.
+
+Note [Out-of-bounds error messages]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+The default method for 'index' generates hoplelessIndexError, because
+Ix doesn't have Show as a superclass.  For particular base types we
+can do better, so we override the default method for index.
+-}
+
+-- Abstract these errors from the relevant index functions so that
+-- the guts of the function will be small enough to inline.
+
+{-# NOINLINE indexError #-}
+indexError :: Show a => (a,a) -> a -> String -> b
+indexError rng i tp
+  = errorWithoutStackTrace (showString "Ix{" . showString tp . showString "}.index: Index " .
+           showParen True (showsPrec 0 i) .
+           showString " out of range " $
+           showParen True (showsPrec 0 rng) "")
+
+hopelessIndexError :: Int -- Try to use 'indexError' instead!
+hopelessIndexError = errorWithoutStackTrace "Error in array index"
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance  Ix Char  where
+    {-# INLINE range #-}
+    range (m,n) = [m..n]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex (m,_n) i = fromEnum i - fromEnum m
+
+    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
+                          -- and Note [Inlining index]
+    index b i | inRange b i =  unsafeIndex b i
+              | otherwise   =  indexError b i "Char"
+
+    inRange (m,n) i     =  m <= i && i <= n
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance  Ix Int  where
+    {-# INLINE range #-}
+        -- The INLINE stops the build in the RHS from getting inlined,
+        -- so that callers can fuse with the result of range
+    range (m,n) = [m..n]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex (m,_n) i = i - m
+
+    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
+                          -- and Note [Inlining index]
+    index b i | inRange b i =  unsafeIndex b i
+              | otherwise   =  indexError b i "Int"
+
+    {-# INLINE inRange #-}
+    inRange (I# m,I# n) (I# i) =  isTrue# (m <=# i) && isTrue# (i <=# n)
+
+-- | @since 4.6.0.0
+instance Ix Word where
+    range (m,n)         = [m..n]
+    unsafeIndex (m,_) i = fromIntegral (i - m)
+    inRange (m,n) i     = m <= i && i <= n
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance  Ix Integer  where
+    {-# INLINE range #-}
+    range (m,n) = [m..n]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex (m,_n) i   = fromInteger (i - m)
+
+    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
+                          -- and Note [Inlining index]
+    index b i | inRange b i =  unsafeIndex b i
+              | otherwise   =  indexError b i "Integer"
+
+    inRange (m,n) i     =  m <= i && i <= n
+
+----------------------------------------------------------------------
+-- | @since 4.8.0.0
+instance Ix Natural where
+    range (m,n) = [m..n]
+    inRange (m,n) i = m <= i && i <= n
+    unsafeIndex (m,_) i = fromIntegral (i-m)
+    index b i | inRange b i = unsafeIndex b i
+              | otherwise   = indexError b i "Natural"
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance Ix Bool where -- as derived
+    {-# INLINE range #-}
+    range (m,n) = [m..n]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex (l,_) i = fromEnum i - fromEnum l
+
+    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
+                          -- and Note [Inlining index]
+    index b i | inRange b i =  unsafeIndex b i
+              | otherwise   =  indexError b i "Bool"
+
+    inRange (l,u) i = fromEnum i >= fromEnum l && fromEnum i <= fromEnum u
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance Ix Ordering where -- as derived
+    {-# INLINE range #-}
+    range (m,n) = [m..n]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex (l,_) i = fromEnum i - fromEnum l
+
+    {-# INLINE index #-}  -- See Note [Out-of-bounds error messages]
+                          -- and Note [Inlining index]
+    index b i | inRange b i =  unsafeIndex b i
+              | otherwise   =  indexError b i "Ordering"
+
+    inRange (l,u) i = fromEnum i >= fromEnum l && fromEnum i <= fromEnum u
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance Ix () where
+    {-# INLINE range #-}
+    range   ((), ())    = [()]
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex   ((), ()) () = 0
+    {-# INLINE inRange #-}
+    inRange ((), ()) () = True
+
+    {-# INLINE index #-}  -- See Note [Inlining index]
+    index b i = unsafeIndex b i
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance (Ix a, Ix b) => Ix (a, b) where -- as derived
+    {-# SPECIALISE instance Ix (Int,Int) #-}
+
+    {-# INLINE range #-}
+    range ((l1,l2),(u1,u2)) =
+      [ (i1,i2) | i1 <- range (l1,u1), i2 <- range (l2,u2) ]
+
+    {-# INLINE unsafeIndex #-}
+    unsafeIndex ((l1,l2),(u1,u2)) (i1,i2) =
+      unsafeIndex (l1,u1) i1 * unsafeRangeSize (l2,u2) + unsafeIndex (l2,u2) i2
+
+    {-# INLINE inRange #-}
+    inRange ((l1,l2),(u1,u2)) (i1,i2) =
+      inRange (l1,u1) i1 && inRange (l2,u2) i2
+
+    -- Default method for index
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance  (Ix a1, Ix a2, Ix a3) => Ix (a1,a2,a3)  where
+    {-# SPECIALISE instance Ix (Int,Int,Int) #-}
+
+    range ((l1,l2,l3),(u1,u2,u3)) =
+        [(i1,i2,i3) | i1 <- range (l1,u1),
+                      i2 <- range (l2,u2),
+                      i3 <- range (l3,u3)]
+
+    unsafeIndex ((l1,l2,l3),(u1,u2,u3)) (i1,i2,i3) =
+      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
+      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
+      unsafeIndex (l1,u1) i1))
+
+    inRange ((l1,l2,l3),(u1,u2,u3)) (i1,i2,i3) =
+      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
+      inRange (l3,u3) i3
+
+    -- Default method for index
+
+----------------------------------------------------------------------
+-- | @since 2.01
+instance  (Ix a1, Ix a2, Ix a3, Ix a4) => Ix (a1,a2,a3,a4)  where
+    range ((l1,l2,l3,l4),(u1,u2,u3,u4)) =
+      [(i1,i2,i3,i4) | i1 <- range (l1,u1),
+                       i2 <- range (l2,u2),
+                       i3 <- range (l3,u3),
+                       i4 <- range (l4,u4)]
+
+    unsafeIndex ((l1,l2,l3,l4),(u1,u2,u3,u4)) (i1,i2,i3,i4) =
+      unsafeIndex (l4,u4) i4 + unsafeRangeSize (l4,u4) * (
+      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
+      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
+      unsafeIndex (l1,u1) i1)))
+
+    inRange ((l1,l2,l3,l4),(u1,u2,u3,u4)) (i1,i2,i3,i4) =
+      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
+      inRange (l3,u3) i3 && inRange (l4,u4) i4
+
+    -- Default method for index
+-- | @since 2.01
+instance  (Ix a1, Ix a2, Ix a3, Ix a4, Ix a5) => Ix (a1,a2,a3,a4,a5)  where
+    range ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) =
+      [(i1,i2,i3,i4,i5) | i1 <- range (l1,u1),
+                          i2 <- range (l2,u2),
+                          i3 <- range (l3,u3),
+                          i4 <- range (l4,u4),
+                          i5 <- range (l5,u5)]
+
+    unsafeIndex ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) (i1,i2,i3,i4,i5) =
+      unsafeIndex (l5,u5) i5 + unsafeRangeSize (l5,u5) * (
+      unsafeIndex (l4,u4) i4 + unsafeRangeSize (l4,u4) * (
+      unsafeIndex (l3,u3) i3 + unsafeRangeSize (l3,u3) * (
+      unsafeIndex (l2,u2) i2 + unsafeRangeSize (l2,u2) * (
+      unsafeIndex (l1,u1) i1))))
+
+    inRange ((l1,l2,l3,l4,l5),(u1,u2,u3,u4,u5)) (i1,i2,i3,i4,i5) =
+      inRange (l1,u1) i1 && inRange (l2,u2) i2 &&
+      inRange (l3,u3) i3 && inRange (l4,u4) i4 &&
+      inRange (l5,u5) i5
+
+    -- Default method for index
diff --git a/GHC/List.hs b/GHC/List.hs
--- a/GHC/List.hs
+++ b/GHC/List.hs
@@ -44,7 +44,7 @@
 -- List-manipulation functions
 --------------------------------------------------------------
 
--- | /O(1)/. Extract the first element of a list, which must be non-empty.
+-- | \(\mathcal{O}(1)\). Extract the first element of a list, which must be non-empty.
 head                    :: [a] -> a
 head (x:_)              =  x
 head []                 =  badHead
@@ -62,8 +62,8 @@
                 head (augment g xs) = g (\x _ -> x) (head xs)
  #-}
 
--- | /O(1)/. Decompose a list into its head and tail. If the list is empty,
--- returns 'Nothing'. If the list is non-empty, returns @'Just' (x, xs)@,
+-- | \(\mathcal{O}(1)\). Decompose a list into its head and tail. If the list is
+-- empty, returns 'Nothing'. If the list is non-empty, returns @'Just' (x, xs)@,
 -- where @x@ is the head of the list and @xs@ its tail.
 --
 -- @since 4.8.0.0
@@ -71,14 +71,14 @@
 uncons []               = Nothing
 uncons (x:xs)           = Just (x, xs)
 
--- | /O(1)/. Extract the elements after the head of a list, which must be
--- non-empty.
+-- | \(\mathcal{O}(1)\). Extract the elements after the head of a list, which
+-- must be non-empty.
 tail                    :: [a] -> [a]
 tail (_:xs)             =  xs
 tail []                 =  errorEmptyList "tail"
 
--- | /O(n)/. Extract the last element of a list, which must be finite and
--- non-empty.
+-- | \(\mathcal{O}(n)\). Extract the last element of a list, which must be
+-- finite and non-empty.
 last                    :: [a] -> a
 #if defined(USE_REPORT_PRELUDE)
 last [x]                =  x
@@ -96,7 +96,7 @@
 lastError = errorEmptyList "last"
 #endif
 
--- | /O(n)/. Return all the elements of a list except the last one.
+-- | \(\mathcal{O}(n)\). Return all the elements of a list except the last one.
 -- The list must be non-empty.
 init                    :: [a] -> [a]
 #if defined(USE_REPORT_PRELUDE)
@@ -111,14 +111,14 @@
         init' y (z:zs) = y : init' z zs
 #endif
 
--- | /O(1)/. Test whether a list is empty.
+-- | \(\mathcal{O}(1)\). Test whether a list is empty.
 null                    :: [a] -> Bool
 null []                 =  True
 null (_:_)              =  False
 
--- | /O(n)/. 'length' returns the length of a finite list as an 'Int'.
--- It is an instance of the more general 'Data.List.genericLength',
--- the result type of which may be any kind of number.
+-- | \(\mathcal{O}(n)\). 'length' returns the length of a finite list as an
+-- 'Int'. It is an instance of the more general 'Data.List.genericLength', the
+-- result type of which may be any kind of number.
 {-# NOINLINE [1] length #-}
 length                  :: [a] -> Int
 length xs               = lenAcc xs 0
@@ -142,8 +142,8 @@
 idLength :: Int -> Int
 idLength = id
 
--- | /O(n)/. 'filter', applied to a predicate and a list, returns the list of
--- those elements that satisfy the predicate; i.e.,
+-- | \(\mathcal{O}(n)\). 'filter', applied to a predicate and a list, returns
+-- the list of those elements that satisfy the predicate; i.e.,
 --
 -- > filter p xs = [ x | x <- xs, p x]
 --
@@ -226,7 +226,7 @@
 when no fusion happens.
 
 Without these inline pragmas, the loop in perf/should_run/T13001 won't be
-allocation-free. Also see Trac #13001.
+allocation-free. Also see #13001.
 -}
 
 -- ----------------------------------------------------------------------------
@@ -262,8 +262,8 @@
 {-# INLINE product #-}
 product                 =  foldl (*) 1
 
--- | /O(n)/. 'scanl' is similar to 'foldl', but returns a list of successive
--- reduced values from the left:
+-- | \(\mathcal{O}(n)\). 'scanl' is similar to 'foldl', but returns a list of
+-- successive reduced values from the left:
 --
 -- > scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]
 --
@@ -300,8 +300,8 @@
 constScanl = const
 
 
--- | /O(n)/. 'scanl1' is a variant of 'scanl' that has no starting value
--- argument:
+-- | \(\mathcal{O}(n)\). 'scanl1' is a variant of 'scanl' that has no starting
+-- value argument:
 --
 -- > scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]
 
@@ -309,7 +309,7 @@
 scanl1 f (x:xs)         =  scanl f x xs
 scanl1 _ []             =  []
 
--- | /O(n)/. A strictly accumulating version of 'scanl'
+-- | \(\mathcal{O}(n)\). A strictly accumulating version of 'scanl'
 {-# NOINLINE [1] scanl' #-}
 scanl'           :: (b -> a -> b) -> b -> [a] -> [b]
 -- This peculiar form is needed to prevent scanl' from being rewritten
@@ -381,7 +381,7 @@
         go []             =  errorEmptyList "foldr1"
 {-# INLINE [0] foldr1 #-}
 
--- | /O(n)/. 'scanr' is the right-to-left dual of 'scanl'.
+-- | \(\mathcal{O}(n)\). 'scanr' is the right-to-left dual of 'scanl'.
 -- Note that
 --
 -- > head (scanr f z xs) == foldr f z xs.
@@ -391,7 +391,51 @@
 scanr f q0 (x:xs)       =  f x q : qs
                            where qs@(q:_) = scanr f q0 xs
 
--- | /O(n)/. 'scanr1' is a variant of 'scanr' that has no starting
+{-# INLINE [0] strictUncurryScanr #-}
+strictUncurryScanr :: (a -> b -> c) -> (a, b) -> c
+strictUncurryScanr f pair = case pair of
+                              (x, y) -> f x y
+
+{-# INLINE [0] scanrFB #-} -- See Note [Inline FB functions]
+scanrFB :: (a -> b -> b) -> (b -> c -> c) -> a -> (b, c) -> (b, c)
+scanrFB f c = \x ~(r, est) -> (f x r, r `c` est)
+-- This lazy pattern match on the tuple is necessary to prevent
+-- an infinite loop when scanr recieves a fusable infinite list,
+-- which was the reason for #16943.
+-- See Note [scanrFB and evaluation] below
+
+{-# RULES
+"scanr" [~1] forall f q0 ls . scanr f q0 ls =
+  build (\c n -> strictUncurryScanr c (foldr (scanrFB f c) (q0,n) ls))
+"scanrList" [1] forall f q0 ls .
+               strictUncurryScanr (:) (foldr (scanrFB f (:)) (q0,[]) ls) =
+                 scanr f q0 ls
+ #-}
+
+{- Note [scanrFB and evaluation]
+In a previous Version, the pattern match on the tuple in scanrFB used to be
+strict. If scanr is called with a build expression, the following would happen:
+The rule "scanr" would fire, and we obtain
+    build (\c n -> strictUncurryScanr c (foldr (scanrFB f c) (q0,n) (build g))))
+The rule "foldr/build" now fires, and the second argument of strictUncurryScanr
+will be the expression
+    g (scanrFB f c) (q0,n)
+which will be evaluated, thanks to strictUncurryScanr.
+The type of (g :: (a -> b -> b) -> b -> b) allows us to apply parametricity:
+Either the tuple is returned (trivial), or scanrFB is called:
+    g (scanrFB f c) (q0,n) = scanrFB ... (g' (scanrFB f c) (q0,n))
+Notice that thanks to the strictness of scanrFB, the expression
+g' (scanrFB f c) (q0,n) gets evaluated aswell. In particular, if g' is a
+recursive case of g, parametricity applies again and we will again have a
+possible call to scanrFB. In short, g (scanrFB f c) (q0,n) will end up being
+completely evaluated. This is resource consuming for large lists and if the
+recursion has no exit condition (and this will be the case in functions like
+repeat or cycle), the program will crash (see #16943).
+The solution: Don't make scanrFB strict in its last argument. Doing so will
+remove the cause for the chain of evaluations, and all is well.
+-}
+
+-- | \(\mathcal{O}(n)\). 'scanr1' is a variant of 'scanr' that has no starting
 -- value argument.
 scanr1                  :: (a -> a -> a) -> [a] -> [a]
 scanr1 _ []             =  []
@@ -835,7 +879,8 @@
  #-}
 #endif
 
--- | /O(n)/. 'lookup' @key assocs@ looks up a key in an association list.
+-- | \(\mathcal{O}(n)\). 'lookup' @key assocs@ looks up a key in an association
+-- list.
 --
 -- >>> lookup 2 [(1, "first"), (2, "second"), (3, "third")]
 -- Just "second"
@@ -908,14 +953,14 @@
         go []    _ys     = z
         go _xs   []      = z
         go (x:xs) (y:ys) = k x y (go xs ys)
-{-# INLINE [0] foldr2 #-}
+{-# INLINE [0] foldr2 #-}  -- See Note [Fusion for foldrN]
 
 foldr2_left :: (a -> b -> c -> d) -> d -> a -> ([b] -> c) -> [b] -> d
 foldr2_left _k  z _x _r []     = z
 foldr2_left  k _z  x  r (y:ys) = k x y (r ys)
 
 -- foldr2 k z xs ys = foldr (foldr2_left k z)  (\_ -> z) xs ys
-{-# RULES
+{-# RULES   -- See Note [Fusion for foldrN]
 "foldr2/left"   forall k z ys (g::forall b.(a->b->b)->b->b) .
                   foldr2 k z (build g) ys = g (foldr2_left  k z) (\_ -> z) ys
  #-}
@@ -927,7 +972,7 @@
     go  _     []     _      = z
     go  _     _      []     = z
     go (a:as) (b:bs) (c:cs) = k a b c (go as bs cs)
-{-# INLINE [0] foldr3 #-}
+{-# INLINE [0] foldr3 #-}  -- See Note [Fusion for foldrN]
 
 
 foldr3_left :: (a -> b -> c -> d -> e) -> e -> a ->
@@ -936,32 +981,67 @@
 foldr3_left _  z _ _  _      _     = z
 
 -- foldr3 k n xs ys zs = foldr (foldr3_left k n) (\_ _ -> n) xs ys zs
-{-# RULES
+{-# RULES   -- See Note [Fusion for foldrN]
 "foldr3/left"   forall k z (g::forall b.(a->b->b)->b->b).
                   foldr3 k z (build g) = g (foldr3_left k z) (\_ _ -> z)
  #-}
 
--- There used to be a foldr2/right rule, allowing foldr2 to fuse with a build
--- form on the right. However, this causes trouble if the right list ends in
--- a bottom that is only avoided by the left list ending at that spot. That is,
--- foldr2 f z [a,b,c] (d:e:f:_|_), where the right list is produced by a build
--- form, would cause the foldr2/right rule to introduce bottom. Example:
---
--- zip [1,2,3,4] (unfoldr (\s -> if s > 4 then undefined else Just (s,s+1)) 1)
---
--- should produce
---
--- [(1,1),(2,2),(3,3),(4,4)]
---
--- but with the foldr2/right rule it would instead produce
---
--- (1,1):(2,2):(3,3):(4,4):_|_
+{- Note [Fusion for foldrN]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~
+We arrange that foldr2, foldr3, etc is a good consumer for its first
+(left) list argument. Here's how. See below for the second, third
+etc list arguments
 
--- Zips for larger tuples are in the List module.
+* The rule "foldr2/left" (active only before phase 1) does this:
+     foldr2 k z (build g) ys = g (foldr2_left  k z) (\_ -> z) ys
+  thereby fusing away the 'build' on the left argument
 
+* To ensure this rule has a chance to fire, foldr2 has a NOINLINE[1] pragma
+
+There used to be a "foldr2/right" rule, allowing foldr2 to fuse with a build
+form on the right. However, this causes trouble if the right list ends in
+a bottom that is only avoided by the left list ending at that spot. That is,
+foldr2 f z [a,b,c] (d:e:f:_|_), where the right list is produced by a build
+form, would cause the foldr2/right rule to introduce bottom. Example:
+  zip [1,2,3,4] (unfoldr (\s -> if s > 4 then undefined else Just (s,s+1)) 1)
+should produce
+  [(1,1),(2,2),(3,3),(4,4)]
+but with the foldr2/right rule it would instead produce
+  (1,1):(2,2):(3,3):(4,4):_|_
+
+Note [Fusion for zipN/zipWithN]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+We arrange that zip, zip3, etc, and zipWith, zipWit3 etc, are all
+good consumers for their first (left) argument, and good producers.
+Here's how.  See Note [Fusion for foldr2] for why it can't fuse its
+second (right) list argument.
+
+NB: Zips for larger tuples are in the List module.
+
+* Rule "zip" (active only before phase 1) rewrites
+    zip xs ys = build (\c n -> foldr2 (zipFB c) n xs ys)
+  See also Note [Inline FB functions]
+
+  Ditto rule "zipWith".
+
+* To give this rule a chance to fire, we give zip a NOLINLINE[1]
+  pragma (although since zip is recursive it might not need it)
+
+* Now the rules for foldr2 (see Note [Fusion for foldr2]) may fire,
+  or rules that fuse the build-produced output of zip.
+
+* If none of these fire, rule "zipList" (active only in phase 1)
+  rewrites the foldr2 call back to zip
+     foldr2 (zipFB (:)) []   = zip
+  This rule will only fire when build has inlined, which also
+  happens in phase 1.
+
+  Ditto rule "zipWithList".
+-}
+
 ----------------------------------------------
--- | /O(min(m,n))/. 'zip' takes two lists and returns a list of corresponding
--- pairs.
+-- | \(\mathcal{O}(\min(m,n))\). 'zip' takes two lists and returns a list of
+-- corresponding pairs.
 --
 -- > zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]
 --
@@ -978,7 +1058,7 @@
 --
 -- 'zip' is capable of list fusion, but it is restricted to its
 -- first list argument and its resulting list.
-{-# NOINLINE [1] zip #-}
+{-# NOINLINE [1] zip #-}  -- See Note [Fusion for zipN/zipWithN]
 zip :: [a] -> [b] -> [(a,b)]
 zip []     _bs    = []
 zip _as    []     = []
@@ -988,7 +1068,7 @@
 zipFB :: ((a, b) -> c -> d) -> a -> b -> c -> d
 zipFB c = \x y r -> (x,y) `c` r
 
-{-# RULES
+{-# RULES  -- See Note [Fusion for zipN/zipWithN]
 "zip"      [~1] forall xs ys. zip xs ys = build (\c n -> foldr2 (zipFB c) n xs ys)
 "zipList"  [1]  foldr2 (zipFB (:)) []   = zip
  #-}
@@ -1009,7 +1089,7 @@
 zip3FB :: ((a,b,c) -> xs -> xs') -> a -> b -> c -> xs -> xs'
 zip3FB cons = \a b c r -> (a,b,c) `cons` r
 
-{-# RULES
+{-# RULES    -- See Note [Fusion for zipN/zipWithN]
 "zip3"       [~1] forall as bs cs. zip3 as bs cs = build (\c n -> foldr3 (zip3FB c) n as bs cs)
 "zip3List"   [1]          foldr3 (zip3FB (:)) [] = zip3
  #-}
@@ -1018,10 +1098,10 @@
 -- function given as the first argument, instead of a tupling function.
 
 ----------------------------------------------
--- | /O(min(m,n))/. 'zipWith' generalises 'zip' by zipping with the function
--- given as the first argument, instead of a tupling function. For example,
--- @'zipWith' (+)@ is applied to two lists to produce the list of corresponding
--- sums:
+-- | \(\mathcal{O}(\min(m,n))\). 'zipWith' generalises 'zip' by zipping with the
+-- function given as the first argument, instead of a tupling function. For
+-- example, @'zipWith' (+)@ is applied to two lists to produce the list of
+-- corresponding sums:
 --
 -- >>> zipWith (+) [1, 2, 3] [4, 5, 6]
 -- [5,7,9]
@@ -1032,7 +1112,7 @@
 --
 -- 'zipWith' is capable of list fusion, but it is restricted to its
 -- first list argument and its resulting list.
-{-# NOINLINE [1] zipWith #-}
+{-# NOINLINE [1] zipWith #-}  -- See Note [Fusion for zipN/zipWithN]
 zipWith :: (a->b->c) -> [a]->[b]->[c]
 zipWith f = go
   where
@@ -1046,7 +1126,7 @@
 zipWithFB :: (a -> b -> c) -> (d -> e -> a) -> d -> e -> b -> c
 zipWithFB c f = \x y r -> (x `f` y) `c` r
 
-{-# RULES
+{-# RULES       -- See Note [Fusion for zipN/zipWithN]
 "zipWith"       [~1] forall f xs ys.    zipWith f xs ys = build (\c n -> foldr2 (zipWithFB c f) n xs ys)
 "zipWithList"   [1]  forall f.  foldr2 (zipWithFB (:) f) [] = zipWith f
   #-}
@@ -1076,12 +1156,16 @@
 -- and a list of second components.
 unzip    :: [(a,b)] -> ([a],[b])
 {-# INLINE unzip #-}
+-- Inline so that fusion `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] in GHC/OldList.hs.
 unzip    =  foldr (\(a,b) ~(as,bs) -> (a:as,b:bs)) ([],[])
 
 -- | The 'unzip3' function takes a list of triples and returns three
 -- lists, analogous to 'unzip'.
 unzip3   :: [(a,b,c)] -> ([a],[b],[c])
 {-# INLINE unzip3 #-}
+-- Inline so that fusion `foldr` has an opportunity to fire.
+-- See Note [Inline @unzipN@ functions] in GHC/OldList.hs.
 unzip3   =  foldr (\(a,b,c) ~(as,bs,cs) -> (a:as,b:bs,c:cs))
                   ([],[],[])
 
diff --git a/GHC/Natural.hs b/GHC/Natural.hs
--- a/GHC/Natural.hs
+++ b/GHC/Natural.hs
@@ -98,7 +98,7 @@
 -- TODO: Note that some functions have commented CONSTANT_FOLDED annotations,
 -- that's because the Integer counter-parts of these functions do actually have
 -- a builtinRule in PrelRules, where the Natural functions do not. The plan is
--- to eventually also add builtin rules for those function on Natural.
+-- to eventually also add builtin rules for those functions on Natural.
 #define CONSTANT_FOLDED NOINLINE
 
 -------------------------------------------------------------------------------
@@ -157,7 +157,9 @@
 isValidNatural :: Natural -> Bool
 isValidNatural (NatS# _)  = True
 isValidNatural (NatJ# bn) = isTrue# (isValidBigNat# bn)
-                            && isTrue# (sizeofBigNat# bn ># 0#)
+                            -- A 1-limb BigNat could fit into a NatS#, so we
+                            -- require at least 2 limbs.
+                            && isTrue# (sizeofBigNat# bn ># 1#)
 
 signumNatural :: Natural -> Natural
 signumNatural (NatS# 0##) = NatS# 0##
@@ -188,7 +190,7 @@
 gcdNatural (NatS# x) (NatJ# y) = NatS# (gcdBigNatWord y x)
 gcdNatural (NatS# x) (NatS# y) = NatS# (gcdWord x y)
 
--- | compute least common multiplier.
+-- | Compute least common multiple.
 lcmNatural :: Natural -> Natural -> Natural
 lcmNatural (NatS# 0##) _ = NatS# 0##
 lcmNatural _ (NatS# 0##) = NatS# 0##
@@ -228,7 +230,7 @@
 remNatural   (NatJ# n) (NatJ# d) = bigNatToNatural (remBigNat n d)
 -- {-# CONSTANT_FOLDED remNatural #-}
 
--- | @since 4.12.0.0
+-- | @since 4.X.0.0
 naturalToInteger :: Natural -> Integer
 naturalToInteger (NatS# w)  = wordToInteger w
 naturalToInteger (NatJ# bn) = Jp# bn
diff --git a/GHC/OverloadedLabels.hs b/GHC/OverloadedLabels.hs
--- a/GHC/OverloadedLabels.hs
+++ b/GHC/OverloadedLabels.hs
@@ -19,7 +19,7 @@
 --
 -- This module defines the 'IsLabel' class is used by the
 -- @OverloadedLabels@ extension.  See the
--- <https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields/OverloadedLabels wiki page>
+-- <https://gitlab.haskell.org/ghc/ghc/wikis/records/overloaded-record-fields/overloaded-labels wiki page>
 -- for more details.
 --
 -- When @OverloadedLabels@ is enabled, if GHC sees an occurrence of
diff --git a/GHC/RTS/Flags.hsc b/GHC/RTS/Flags.hsc
--- a/GHC/RTS/Flags.hsc
+++ b/GHC/RTS/Flags.hsc
@@ -138,7 +138,9 @@
     , generateCrashDumpFile :: Bool
     , generateStackTrace    :: Bool
     , machineReadable       :: Bool
+    , disableDelayedOsMemoryReturn :: Bool
     , internalCounters      :: Bool
+    , linkerAlwaysPic       :: Bool
     , linkerMemBase         :: Word
       -- ^ address to ask the OS for memory for the linker, 0 ==> off
     } deriving ( Show -- ^ @since 4.8.0.0
@@ -149,21 +151,22 @@
 --
 -- @since 4.8.0.0
 data DebugFlags = DebugFlags
-    { scheduler   :: Bool -- ^ @s@
-    , interpreter :: Bool -- ^ @i@
-    , weak        :: Bool -- ^ @w@
-    , gccafs      :: Bool -- ^ @G@
-    , gc          :: Bool -- ^ @g@
-    , block_alloc :: Bool -- ^ @b@
-    , sanity      :: Bool -- ^ @S@
-    , stable      :: Bool -- ^ @t@
-    , prof        :: Bool -- ^ @p@
-    , linker      :: Bool -- ^ @l@ the object linker
-    , apply       :: Bool -- ^ @a@
-    , stm         :: Bool -- ^ @m@
-    , squeeze     :: Bool -- ^ @z@ stack squeezing & lazy blackholing
-    , hpc         :: Bool -- ^ @c@ coverage
-    , sparks      :: Bool -- ^ @r@
+    { scheduler      :: Bool -- ^ @s@
+    , interpreter    :: Bool -- ^ @i@
+    , weak           :: Bool -- ^ @w@
+    , gccafs         :: Bool -- ^ @G@
+    , gc             :: Bool -- ^ @g@
+    , nonmoving_gc   :: Bool -- ^ @n@
+    , block_alloc    :: Bool -- ^ @b@
+    , sanity         :: Bool -- ^ @S@
+    , stable         :: Bool -- ^ @t@
+    , prof           :: Bool -- ^ @p@
+    , linker         :: Bool -- ^ @l@ the object linker
+    , apply          :: Bool -- ^ @a@
+    , stm            :: Bool -- ^ @m@
+    , squeeze        :: Bool -- ^ @z@ stack squeezing & lazy blackholing
+    , hpc            :: Bool -- ^ @c@ coverage
+    , sparks         :: Bool -- ^ @r@
     } deriving ( Show -- ^ @since 4.8.0.0
                )
 
@@ -290,6 +293,8 @@
     , timestamp      :: Bool -- ^ show timestamp in stderr output
     , traceScheduler :: Bool -- ^ trace scheduler events
     , traceGc        :: Bool -- ^ trace GC events
+    , traceNonmovingGc
+                     :: Bool -- ^ trace nonmoving GC heap census samples
     , sparksSampled  :: Bool -- ^ trace spark events by a sampled method
     , sparksFull     :: Bool -- ^ trace spark events 100% accurately
     , user           :: Bool -- ^ trace user events (emitted from Haskell code)
@@ -443,7 +448,11 @@
             <*> (toBool <$>
                   (#{peek MISC_FLAGS, machineReadable} ptr :: IO CBool))
             <*> (toBool <$>
+                  (#{peek MISC_FLAGS, disableDelayedOsMemoryReturn} ptr :: IO CBool))
+            <*> (toBool <$>
                   (#{peek MISC_FLAGS, internalCounters} ptr :: IO CBool))
+            <*> (toBool <$>
+                  (#{peek MISC_FLAGS, linkerAlwaysPic} ptr :: IO CBool))
             <*> #{peek MISC_FLAGS, linkerMemBase} ptr
 
 getDebugFlags :: IO DebugFlags
@@ -460,6 +469,8 @@
              <*> (toBool <$>
                    (#{peek DEBUG_FLAGS, gc} ptr :: IO CBool))
              <*> (toBool <$>
+                   (#{peek DEBUG_FLAGS, nonmoving_gc} ptr :: IO CBool))
+             <*> (toBool <$>
                    (#{peek DEBUG_FLAGS, block_alloc} ptr :: IO CBool))
              <*> (toBool <$>
                    (#{peek DEBUG_FLAGS, sanity} ptr :: IO CBool))
@@ -519,6 +530,8 @@
                    (#{peek TRACE_FLAGS, scheduler} ptr :: IO CBool))
              <*> (toBool <$>
                    (#{peek TRACE_FLAGS, gc} ptr :: IO CBool))
+             <*> (toBool <$>
+                   (#{peek TRACE_FLAGS, nonmoving_gc} ptr :: IO CBool))
              <*> (toBool <$>
                    (#{peek TRACE_FLAGS, sparks_sampled} ptr :: IO CBool))
              <*> (toBool <$>
diff --git a/GHC/Read.hs b/GHC/Read.hs
--- a/GHC/Read.hs
+++ b/GHC/Read.hs
@@ -383,7 +383,7 @@
 -- second argument is a parser for the field value.
 --
 -- Note that 'readField' does not suffice for this purpose due to
--- <https://ghc.haskell.org/trac/ghc/ticket/5041 Trac #5041>.
+-- <https://gitlab.haskell.org/ghc/ghc/issues/5041 #5041>.
 readFieldHash :: String -> ReadPrec a -> ReadPrec a
 readFieldHash fieldName readVal = do
         expectP (L.Ident fieldName)
@@ -420,7 +420,7 @@
 -- parsers. For large record types (e.g. 500 fields), this produces a
 -- significant performance boost.
 --
--- See also Trac #14364.
+-- See also #14364.
 
 
 --------------------------------------------------------------
diff --git a/GHC/Real.hs b/GHC/Real.hs
--- a/GHC/Real.hs
+++ b/GHC/Real.hs
@@ -134,7 +134,7 @@
 --
 -- The Haskell Report defines no laws for 'Integral'. However, 'Integral'
 -- instances are customarily expected to define a Euclidean domain and have the
--- following properties for the `div`\/`mod` and `quot`\/`rem` pairs, given
+-- following properties for the 'div'\/'mod' and 'quot'\/'rem' pairs, given
 -- suitable Euclidean functions @f@ and @g@:
 --
 -- * @x@ = @y * quot x y + rem x y@ with @rem x y@ = @fromInteger 0@ or
@@ -142,7 +142,7 @@
 -- * @x@ = @y * div x y + mod x y@ with @mod x y@ = @fromInteger 0@ or
 -- @f (mod x y)@ < @f y@
 --
--- An example of a suitable Euclidean function, for `Integer`'s instance, is
+-- An example of a suitable Euclidean function, for 'Integer'\'s instance, is
 -- 'abs'.
 class  (Real a, Enum a) => Integral a  where
     -- | integer division truncated toward zero
@@ -295,7 +295,7 @@
 
     9007199254740990 + 1 + 1 + ... > 9007199254740991 + 1/2
 
-We would fall into infinite loop (as reported in Trac #15081).
+We would fall into infinite loop (as reported in #15081).
 
 To remedy the situation, we record the number of `1` that needed to be added
 to the start number, rather than increasing `1` at every time. This approach
@@ -313,7 +313,7 @@
 degeneration on performance (33% increase allocation and 300% increase on
 elapsed time).
 
-See Trac #15081 and Phab:D4650 for the related discussion about this problem.
+See #15081 and Phab:D4650 for the related discussion about this problem.
 -}
 
 --------------------------------------------------------------
@@ -508,6 +508,16 @@
     {-# SPECIALIZE instance RealFrac Rational #-}
     properFraction (x:%y) = (fromInteger (toInteger q), r:%y)
                           where (q,r) = quotRem x y
+    round r =
+      let
+        (n, f) = properFraction r
+        x = if r < 0 then -1 else 1
+      in
+        case (compare (abs f) 0.5, odd n) of
+          (LT, _) -> n
+          (EQ, False) -> n
+          (EQ, True) -> n + x
+          (GT, _) -> n + x
 
 -- | @since 2.0.1
 instance  (Show a)  => Show (Ratio a)  where
diff --git a/GHC/Records.hs b/GHC/Records.hs
--- a/GHC/Records.hs
+++ b/GHC/Records.hs
@@ -17,7 +17,7 @@
 --
 -- This module defines the 'HasField' class used by the
 -- @OverloadedRecordFields@ extension.  See the
--- <https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields
+-- <https://gitlab.haskell.org/ghc/ghc/wikis/records/overloaded-record-fields
 -- wiki page> for more details.
 --
 -----------------------------------------------------------------------------
diff --git a/GHC/StableName.hs b/GHC/StableName.hs
--- a/GHC/StableName.hs
+++ b/GHC/StableName.hs
@@ -13,8 +13,8 @@
 -- Stability   :  experimental
 -- Portability :  non-portable
 --
--- Stable names are a way of performing fast (O(1)), not-quite-exact
--- comparison between objects.
+-- Stable names are a way of performing fast ( \(\mathcal{O}(1)\) ),
+-- not-quite-exact comparison between objects.
 --
 -- Stable names solve the following problem: suppose you want to build
 -- a hash table with Haskell objects as keys, but you want to use
diff --git a/GHC/TypeLits.hs b/GHC/TypeLits.hs
--- a/GHC/TypeLits.hs
+++ b/GHC/TypeLits.hs
@@ -13,9 +13,20 @@
 {-# LANGUAGE MagicHash #-}
 {-# LANGUAGE PolyKinds #-}
 
-{-| This module is an internal GHC module.  It declares the constants used
-in the implementation of type-level natural numbers.  The programmer interface
-for working with type-level naturals should be defined in a separate library.
+{-|
+
+GHC's @DataKinds@ language extension lifts data constructors, natural
+numbers, and strings to the type level. This module provides the
+primitives needed for working with type-level numbers (the 'Nat' kind)
+and strings (the 'Symbol') kind. It also defines the 'TypeError' type
+family, a feature that makes use of type-level strings to support user
+defined type errors.
+
+For now, this module is the API for working with type-level literals.
+However, please note that it is a work in progress and is subject to change.
+Once the design of the @DataKinds@ feature is more stable, this will be
+considered only an internal GHC module, and the programmer interface for
+working with type-level data will be defined in a separate library.
 
 @since 4.6.0.0
 -}
diff --git a/GHC/Unicode.hs b/GHC/Unicode.hs
--- a/GHC/Unicode.hs
+++ b/GHC/Unicode.hs
@@ -34,7 +34,7 @@
 import GHC.Char        (chr)
 import GHC.Real
 import GHC.Enum ( Enum (..), Bounded (..) )
-import GHC.Arr ( Ix (..) )
+import GHC.Ix ( Ix (..) )
 import GHC.Num
 
 -- Data.Char.chr already imports this and we need to define a Show instance
diff --git a/GHC/Word.hs b/GHC/Word.hs
--- a/GHC/Word.hs
+++ b/GHC/Word.hs
@@ -31,6 +31,12 @@
     byteSwap32,
     byteSwap64,
 
+    -- * Bit reversal
+    bitReverse8,
+    bitReverse16,
+    bitReverse32,
+    bitReverse64,
+
     -- * Equality operators
     -- | See GHC.Classes#matching_overloaded_methods_in_rules
     eqWord, neWord, gtWord, geWord, ltWord, leWord,
@@ -51,7 +57,7 @@
 import GHC.Enum
 import GHC.Num
 import GHC.Real
-import GHC.Arr
+import GHC.Ix
 import GHC.Show
 
 ------------------------------------------------------------------------
@@ -168,6 +174,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W8# x#) .&.   (W8# y#)   = W8# (x# `and#` y#)
     (W8# x#) .|.   (W8# y#)   = W8# (x# `or#`  y#)
@@ -201,6 +208,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Word8 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 8
     countLeadingZeros  (W8# x#) = I# (word2Int# (clz8# x#))
     countTrailingZeros (W8# x#) = I# (word2Int# (ctz8# x#))
@@ -356,6 +365,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W16# x#) .&.   (W16# y#)  = W16# (x# `and#` y#)
     (W16# x#) .|.   (W16# y#)  = W16# (x# `or#`  y#)
@@ -389,11 +399,13 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Word16 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 16
     countLeadingZeros  (W16# x#) = I# (word2Int# (clz16# x#))
     countTrailingZeros (W16# x#) = I# (word2Int# (ctz16# x#))
 
--- | Swap bytes in 'Word16'.
+-- | Reverse order of bytes in 'Word16'.
 --
 -- @since 4.7.0.0
 byteSwap16 :: Word16 -> Word16
@@ -590,6 +602,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W32# x#) .&.   (W32# y#)  = W32# (x# `and#` y#)
     (W32# x#) .|.   (W32# y#)  = W32# (x# `or#`  y#)
@@ -623,6 +636,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Word32 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 32
     countLeadingZeros  (W32# x#) = I# (word2Int# (clz32# x#))
     countTrailingZeros (W32# x#) = I# (word2Int# (ctz32# x#))
@@ -762,6 +777,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W64# x#) .&.   (W64# y#)  = W64# (x# `and64#` y#)
     (W64# x#) .|.   (W64# y#)  = W64# (x# `or64#`  y#)
@@ -914,6 +930,7 @@
     {-# INLINE shift #-}
     {-# INLINE bit #-}
     {-# INLINE testBit #-}
+    {-# INLINE popCount #-}
 
     (W64# x#) .&.   (W64# y#)  = W64# (x# `and#` y#)
     (W64# x#) .|.   (W64# y#)  = W64# (x# `or#`  y#)
@@ -959,6 +976,8 @@
 
 -- | @since 4.6.0.0
 instance FiniteBits Word64 where
+    {-# INLINE countLeadingZeros #-}
+    {-# INLINE countTrailingZeros #-}
     finiteBitSize _ = 64
     countLeadingZeros  (W64# x#) = I# (word2Int# (clz64# x#))
     countTrailingZeros (W64# x#) = I# (word2Int# (ctz64# x#))
@@ -991,6 +1010,35 @@
 #else
 byteSwap64 :: Word64 -> Word64
 byteSwap64 (W64# w#) = W64# (byteSwap# w#)
+#endif
+
+-- | Reverse the order of the bits in a 'Word8'.
+--
+-- @since 4.12.0.0
+bitReverse8 :: Word8 -> Word8
+bitReverse8 (W8# w#) = W8# (narrow8Word# (bitReverse8# w#))
+
+-- | Reverse the order of the bits in a 'Word16'.
+--
+-- @since 4.12.0.0
+bitReverse16 :: Word16 -> Word16
+bitReverse16 (W16# w#) = W16# (narrow16Word# (bitReverse16# w#))
+
+-- | Reverse the order of the bits in a 'Word32'.
+--
+-- @since 4.12.0.0
+bitReverse32 :: Word32 -> Word32
+bitReverse32 (W32# w#) = W32# (narrow32Word# (bitReverse32# w#))
+
+-- | Reverse the order of the bits in a 'Word64'.
+--
+-- @since 4.12.0.0
+#if WORD_SIZE_IN_BITS < 64
+bitReverse64 :: Word64 -> Word64
+bitReverse64 (W64# w#) = W64# (bitReverse64# w#)
+#else
+bitReverse64 :: Word64 -> Word64
+bitReverse64 (W64# w#) = W64# (bitReverse# w#)
 #endif
 
 -------------------------------------------------------------------------------
diff --git a/Prelude.hs b/Prelude.hs
--- a/Prelude.hs
+++ b/Prelude.hs
@@ -101,25 +101,32 @@
     seq, ($!),
 
     -- * List operations
-    map, (++), filter,
-    head, last, tail, init, null, length, (!!),
-    reverse,
+    List.map, (List.++), List.filter,
+    List.head, List.last, List.tail, List.init, (List.!!),
+    Foldable.null, Foldable.length,
+    List.reverse,
     -- *** Special folds
-    and, or, any, all,
-    concat, concatMap,
+    Foldable.and, Foldable.or, Foldable.any, Foldable.all,
+    Foldable.concat, Foldable.concatMap,
     -- ** Building lists
     -- *** Scans
-    scanl, scanl1, scanr, scanr1,
+    List.scanl, List.scanl1, List.scanr, List.scanr1,
     -- *** Infinite lists
-    iterate, repeat, replicate, cycle,
+    List.iterate, List.repeat, List.replicate, List.cycle,
     -- ** Sublists
-    take, drop, splitAt, takeWhile, dropWhile, span, break,
+    List.take, List.drop,
+    List.takeWhile, List.dropWhile,
+    List.span, List.break,
+    List.splitAt,
     -- ** Searching lists
-    notElem, lookup,
+    Foldable.notElem,
+    List.lookup,
     -- ** Zipping and unzipping lists
-    zip, zip3, zipWith, zipWith3, unzip, unzip3,
+    List.zip, List.zip3,
+    List.zipWith, List.zipWith3,
+    List.unzip, List.unzip3,
     -- ** Functions on strings
-    lines, words, unlines, unwords,
+    List.lines, List.words, List.unlines, List.unwords,
 
     -- * Converting to and from @String@
     -- ** Converting to @String@
@@ -157,9 +164,10 @@
 import Control.Monad
 import System.IO
 import System.IO.Error
-import Data.List
+import qualified Data.List as List
 import Data.Either
 import Data.Foldable    ( Foldable(..) )
+import qualified Data.Foldable as Foldable
 import Data.Functor     ( (<$>) )
 import Data.Maybe
 import Data.Traversable ( Traversable(..) )
diff --git a/System/Environment/Blank.hsc b/System/Environment/Blank.hsc
--- a/System/Environment/Blank.hsc
+++ b/System/Environment/Blank.hsc
@@ -40,7 +40,7 @@
   ) where
 
 import Foreign.C
-#ifdef mingw32_HOST_OS
+#if defined(mingw32_HOST_OS)
 import Foreign.Ptr
 import GHC.Windows
 import Control.Monad
@@ -61,7 +61,7 @@
       withProgName,
       getEnvironment
   )
-#ifndef mingw32_HOST_OS
+#if !defined(mingw32_HOST_OS)
 import qualified System.Environment as Environment
 #endif
 
@@ -85,7 +85,7 @@
 
 -- | Similar to 'System.Environment.lookupEnv'.
 getEnv :: String -> IO (Maybe String)
-#ifdef mingw32_HOST_OS
+#if defined(mingw32_HOST_OS)
 getEnv = (<$> getEnvironment) . lookup
 #else
 getEnv = Environment.lookupEnv
diff --git a/System/Environment/ExecutablePath.hsc b/System/Environment/ExecutablePath.hsc
--- a/System/Environment/ExecutablePath.hsc
+++ b/System/Environment/ExecutablePath.hsc
@@ -43,7 +43,7 @@
 #include <sys/sysctl.h>
 #elif defined(mingw32_HOST_OS)
 import Control.Exception
-import Data.List
+import Data.List (isPrefixOf)
 import Data.Word
 import Foreign.C
 import Foreign.Marshal.Array
@@ -231,7 +231,7 @@
           | "\\\\?\\" `isPrefixOf` s = drop 4 s
           | otherwise                = s
 
-        -- see https://ghc.haskell.org/trac/ghc/ticket/14460
+        -- see https://gitlab.haskell.org/ghc/ghc/issues/14460
         rejectUNCPath s
           | "\\\\?\\UNC\\" `isPrefixOf` s = path
           | otherwise                     = s
diff --git a/System/IO/Error.hs b/System/IO/Error.hs
--- a/System/IO/Error.hs
+++ b/System/IO/Error.hs
@@ -35,6 +35,7 @@
     isIllegalOperation,
     isPermissionError,
     isUserError,
+    isResourceVanishedError,
 
     -- ** Attributes of I\/O errors
     ioeGetErrorType,
@@ -60,6 +61,7 @@
     illegalOperationErrorType,
     permissionErrorType,
     userErrorType,
+    resourceVanishedErrorType,
 
     -- ** 'IOErrorType' predicates
     isAlreadyExistsErrorType,
@@ -70,6 +72,7 @@
     isIllegalOperationErrorType,
     isPermissionErrorType,
     isUserErrorType,
+    isResourceVanishedErrorType,
 
     -- * Throwing and catching I\/O errors
 
@@ -170,6 +173,13 @@
 isUserError         :: IOError -> Bool
 isUserError          = isUserErrorType             . ioeGetErrorType
 
+-- | An error indicating that the operation failed because the
+-- resource vanished. See 'resourceVanishedErrorType'.
+--
+-- @since 4.14.0.0
+isResourceVanishedError :: IOError -> Bool
+isResourceVanishedError = isResourceVanishedErrorType . ioeGetErrorType
+
 -- -----------------------------------------------------------------------------
 -- IOErrorTypes
 
@@ -210,6 +220,14 @@
 userErrorType            :: IOErrorType
 userErrorType             = UserError
 
+-- | I\/O error where the operation failed because the resource vanished.
+-- This happens when, for example, attempting to write to a closed
+-- socket or attempting to write to a named pipe that was deleted.
+--
+-- @since 4.14.0.0
+resourceVanishedErrorType :: IOErrorType
+resourceVanishedErrorType = ResourceVanished
+
 -- -----------------------------------------------------------------------------
 -- IOErrorType predicates
 
@@ -257,6 +275,14 @@
 isUserErrorType :: IOErrorType -> Bool
 isUserErrorType UserError = True
 isUserErrorType _ = False
+
+-- | I\/O error where the operation failed because the resource vanished.
+-- See 'resourceVanishedErrorType'.
+--
+-- @since 4.14.0.0
+isResourceVanishedErrorType :: IOErrorType -> Bool
+isResourceVanishedErrorType ResourceVanished = True
+isResourceVanishedErrorType _ = False
 
 -- -----------------------------------------------------------------------------
 -- Miscellaneous
diff --git a/System/Mem/StableName.hs b/System/Mem/StableName.hs
--- a/System/Mem/StableName.hs
+++ b/System/Mem/StableName.hs
@@ -10,8 +10,8 @@
 -- Stability   :  experimental
 -- Portability :  non-portable
 --
--- Stable names are a way of performing fast (O(1)), not-quite-exact
--- comparison between objects.
+-- Stable names are a way of performing fast ( \(\mathcal{O}(1)\) ),
+-- not-quite-exact comparison between objects.
 --
 -- Stable names solve the following problem: suppose you want to build
 -- a hash table with Haskell objects as keys, but you want to use
diff --git a/System/Mem/Weak.hs b/System/Mem/Weak.hs
--- a/System/Mem/Weak.hs
+++ b/System/Mem/Weak.hs
@@ -155,7 +155,7 @@
 
  * If a finalizer throws an exception, subsequent finalizers that had
    been queued to run after it do not get run. This behavior may change
-   in a future release. See issue <https://ghc.haskell.org/trac/ghc/ticket/13167 13167>
+   in a future release. See issue <https://gitlab.haskell.org/ghc/ghc/issues/13167 13167>
    on the issue tracker. Writing a finalizer that throws exceptions is
    discouraged.
 
diff --git a/System/Posix/Types.hs b/System/Posix/Types.hs
--- a/System/Posix/Types.hs
+++ b/System/Posix/Types.hs
@@ -95,6 +95,12 @@
 #if defined(HTYPE_TIMER_T)
   CTimer(..),
 #endif
+#if defined(HTYPE_SOCKLEN_T)
+  CSocklen(..),
+#endif
+#if defined(HTYPE_NFDS_T)
+  CNfds(..),
+#endif
 
   Fd(..),
 
@@ -212,6 +218,15 @@
 #if defined(HTYPE_TIMER_T)
 -- | @since 4.10.0.0
 OPAQUE_TYPE_WITH_CTYPE(CTimer,timer_t,HTYPE_TIMER_T)
+#endif
+
+#if defined(HTYPE_SOCKLEN_T)
+-- | @since 4.14.0.0
+INTEGRAL_TYPE(CSocklen,HTYPE_SOCKLEN_T)
+#endif
+#if defined(HTYPE_NFDS_T)
+-- | @since 4.14.0.0
+INTEGRAL_TYPE(CNfds,HTYPE_NFDS_T)
 #endif
 
 -- Make an Fd type rather than using CInt everywhere
diff --git a/System/Timeout.hs b/System/Timeout.hs
--- a/System/Timeout.hs
+++ b/System/Timeout.hs
@@ -16,7 +16,7 @@
 --
 -------------------------------------------------------------------------------
 
-module System.Timeout ( timeout ) where
+module System.Timeout ( Timeout, timeout ) where
 
 #if !defined(mingw32_HOST_OS)
 import Control.Monad
@@ -35,7 +35,11 @@
 -- interrupt the running IO computation when the timeout has
 -- expired.
 
-newtype Timeout = Timeout Unique deriving Eq -- ^ @since 4.0
+-- | An exception thrown to a thread by 'timeout' to interrupt a timed-out
+-- computation.
+--
+-- @since 4.0
+newtype Timeout = Timeout Unique deriving Eq
 
 -- | @since 4.0
 instance Show Timeout where
@@ -67,20 +71,25 @@
 -- another thread.
 --
 -- A tricky implementation detail is the question of how to abort an @IO@
--- computation. This combinator relies on asynchronous exceptions internally.
--- The technique works very well for computations executing inside of the
--- Haskell runtime system, but it doesn't work at all for non-Haskell code.
--- Foreign function calls, for example, cannot be timed out with this
--- combinator simply because an arbitrary C function cannot receive
--- asynchronous exceptions. When @timeout@ is used to wrap an FFI call that
--- blocks, no timeout event can be delivered until the FFI call returns, which
--- pretty much negates the purpose of the combinator. In practice, however,
--- this limitation is less severe than it may sound. Standard I\/O functions
--- like 'System.IO.hGetBuf', 'System.IO.hPutBuf', Network.Socket.accept, or
--- 'System.IO.hWaitForInput' appear to be blocking, but they really don't
--- because the runtime system uses scheduling mechanisms like @select(2)@ to
--- perform asynchronous I\/O, so it is possible to interrupt standard socket
--- I\/O or file I\/O using this combinator.
+-- computation. This combinator relies on asynchronous exceptions internally
+-- (namely throwing the computation the 'Timeout' exception).  The technique
+-- works very well for computations executing inside of the Haskell runtime
+-- system, but it doesn't work at all for non-Haskell code.  Foreign function
+-- calls, for example, cannot be timed out with this combinator simply because
+-- an arbitrary C function cannot receive asynchronous exceptions. When
+-- @timeout@ is used to wrap an FFI call that blocks, no timeout event can be
+-- delivered until the FFI call returns, which pretty much negates the purpose
+-- of the combinator. In practice, however, this limitation is less severe than
+-- it may sound. Standard I\/O functions like 'System.IO.hGetBuf',
+-- 'System.IO.hPutBuf', Network.Socket.accept, or 'System.IO.hWaitForInput'
+-- appear to be blocking, but they really don't because the runtime system uses
+-- scheduling mechanisms like @select(2)@ to perform asynchronous I\/O, so it
+-- is possible to interrupt standard socket I\/O or file I\/O using this
+-- combinator.
+---
+-- Note that 'timeout' cancels the computation by throwing it the 'Timeout'
+-- exception. Consequently blanket exception handlers (e.g. catching
+-- 'SomeException') within the computation will break the timeout behavior.
 timeout :: Int -> IO a -> IO (Maybe a)
 timeout n f
     | n <  0    = fmap Just f
diff --git a/Text/ParserCombinators/ReadP.hs b/Text/ParserCombinators/ReadP.hs
--- a/Text/ParserCombinators/ReadP.hs
+++ b/Text/ParserCombinators/ReadP.hs
@@ -99,7 +99,7 @@
   | Look (String -> P a)
   | Fail
   | Result a (P a)
-  | Final [(a,String)] -- invariant: list is non-empty!
+  | Final (NonEmpty (a,String))
   deriving Functor -- ^ @since 4.8.0.0
 
 -- Monad, MonadPlus
@@ -114,11 +114,11 @@
 
 -- | @since 2.01
 instance Monad P where
-  (Get f)      >>= k = Get (\c -> f c >>= k)
-  (Look f)     >>= k = Look (\s -> f s >>= k)
-  Fail         >>= _ = Fail
-  (Result x p) >>= k = k x <|> (p >>= k)
-  (Final r)    >>= k = final [ys' | (x,s) <- r, ys' <- run (k x) s]
+  (Get f)         >>= k = Get (\c -> f c >>= k)
+  (Look f)        >>= k = Look (\s -> f s >>= k)
+  Fail            >>= _ = Fail
+  (Result x p)    >>= k = k x <|> (p >>= k)
+  (Final (r:|rs)) >>= k = final [ys' | (x,s) <- (r:rs), ys' <- run (k x) s]
 
 -- | @since 4.9.0.0
 instance MonadFail P where
@@ -142,11 +142,15 @@
   -- two finals are combined
   -- final + look becomes one look and one final (=optimization)
   -- final + sthg else becomes one look and one final
-  Final r    <|> Final t    = Final (r ++ t)
-  Final r    <|> Look f     = Look (\s -> Final (r ++ run (f s) s))
-  Final r    <|> p          = Look (\s -> Final (r ++ run p s))
-  Look f     <|> Final r    = Look (\s -> Final (run (f s) s ++ r))
-  p          <|> Final r    = Look (\s -> Final (run p s ++ r))
+  Final r       <|> Final t = Final (r <> t)
+  Final (r:|rs) <|> Look f  = Look (\s -> Final (r:|(rs ++ run (f s) s)))
+  Final (r:|rs) <|> p       = Look (\s -> Final (r:|(rs ++ run p s)))
+  Look f        <|> Final r = Look (\s -> Final (case run (f s) s of
+                                []     -> r
+                                (x:xs) -> (x:|xs) <> r))
+  p             <|> Final r = Look (\s -> Final (case run p s of
+                                []     -> r
+                                (x:xs) -> (x:|xs) <> r))
 
   -- two looks are combined (=optimization)
   -- look + sthg else floats upwards
@@ -189,16 +193,15 @@
 -- Operations over P
 
 final :: [(a,String)] -> P a
--- Maintains invariant for Final constructor
-final [] = Fail
-final r  = Final r
+final []     = Fail
+final (r:rs) = Final (r:|rs)
 
 run :: P a -> ReadS a
-run (Get f)      (c:s) = run (f c) s
-run (Look f)     s     = run (f s) s
-run (Result x p) s     = (x,s) : run p s
-run (Final r)    _     = r
-run _            _     = []
+run (Get f)         (c:s) = run (f c) s
+run (Look f)        s     = run (f s) s
+run (Result x p)    s     = (x,s) : run p s
+run (Final (r:|rs)) _     = (r:rs)
+run _               _     = []
 
 -- ---------------------------------------------------------------------------
 -- Operations over ReadP
diff --git a/Text/Printf.hs b/Text/Printf.hs
--- a/Text/Printf.hs
+++ b/Text/Printf.hs
@@ -93,7 +93,7 @@
 
 import Data.Char
 import Data.Int
-import Data.List
+import Data.List (stripPrefix)
 import Data.Word
 import Numeric
 import Numeric.Natural
diff --git a/Type/Reflection.hs b/Type/Reflection.hs
--- a/Type/Reflection.hs
+++ b/Type/Reflection.hs
@@ -18,6 +18,7 @@
 -- * Simon Peyton-Jones, Stephanie Weirich, Richard Eisenberg,
 -- Dimitrios Vytiniotis. "A reflection on types."
 -- /Proc. Philip Wadler's 60th birthday Festschrift/, Edinburgh (April 2016).
+-- ([PDF](https://www.microsoft.com/en-us/research/wp-content/uploads/2016/08/dynamic.pdf))
 --
 -- The interface provides 'I.TypeRep', a type representation which can
 -- be safely decomposed and composed. See "Data.Dynamic" for an example of this.
diff --git a/aclocal.m4 b/aclocal.m4
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -106,6 +106,14 @@
 # include <sys/resource.h>
 #endif
 
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
 #include <stdlib.h>
 ])
 
diff --git a/base.cabal b/base.cabal
--- a/base.cabal
+++ b/base.cabal
@@ -1,6 +1,6 @@
 cabal-version:  3.0
 name:           base
-version:        4.13.0.0
+version:        4.14.0.0
 -- NOTE: Don't forget to update ./changelog.md
 
 license:        BSD-3-Clause
@@ -95,7 +95,7 @@
         UnliftedFFITypes
         Unsafe
 
-    build-depends: rts == 1.0, ghc-prim ^>= 0.5.3
+    build-depends: rts == 1.0, ghc-prim ^>= 0.6.1
 
     -- sanity-check to ensure exactly one flag is set
     if !((flag(integer-gmp) && !flag(integer-simple)) || (!flag(integer-gmp) && flag(integer-simple)))
@@ -258,6 +258,7 @@
         GHC.IOArray
         GHC.IORef
         GHC.Int
+        GHC.Ix
         GHC.List
         GHC.Maybe
         GHC.MVar
@@ -327,6 +328,11 @@
         Data.Semigroup.Internal
         Data.Typeable.Internal
         Foreign.ForeignPtr.Imp
+        GHC.IO.Handle.Lock.Common
+        GHC.IO.Handle.Lock.Flock
+        GHC.IO.Handle.Lock.LinuxOFD
+        GHC.IO.Handle.Lock.NoOp
+        GHC.IO.Handle.Lock.Windows
         GHC.StaticPtr.Internal
         System.Environment.ExecutablePath
         System.CPUTime.Utils
@@ -366,7 +372,8 @@
         -- mingw32: Unfortunately required because of a resource leak between
         --          mingwex and mingw32. the __math_err symbol is defined in
         --          mingw32 which is required by mingwex.
-        extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex
+        -- shlwapi: provides PathFileExistsW
+        extra-libraries: wsock32, user32, shell32, msvcrt, mingw32, mingwex, shlwapi
         exposed-modules:
             GHC.IO.Encoding.CodePage.API
             GHC.IO.Encoding.CodePage.Table
diff --git a/cbits/CastFloatWord.cmm b/cbits/CastFloatWord.cmm
--- a/cbits/CastFloatWord.cmm
+++ b/cbits/CastFloatWord.cmm
@@ -61,7 +61,8 @@
 
     reserve 1 = ptr {
         F_[ptr] = f;
-        w = TO_W_(I32[ptr]);
+        // Fix #16617: use zero-extending (TO_ZXW_) here
+        w = TO_ZXW_(I32[ptr]);
     }
 
     return (w);
diff --git a/cbits/Win32Utils.c b/cbits/Win32Utils.c
--- a/cbits/Win32Utils.c
+++ b/cbits/Win32Utils.c
@@ -158,38 +158,54 @@
                              wchar_t* suffix, uint32_t uUnique,
                              wchar_t* tempFileName)
 {
-  if (!GetTempFileNameW(pathName, prefix, uUnique, tempFileName))
+  int retry = 5;
+  bool success = false;
+  while (retry > 0 && !success)
     {
-      maperrno();
-      return false;
-    }
+      // TODO: This needs to handle long file names.
+      if (!GetTempFileNameW(pathName, prefix, uUnique, tempFileName))
+        {
+          maperrno();
+          return false;
+        }
 
-  wchar_t* drive = malloc (sizeof(wchar_t) * _MAX_DRIVE);
-  wchar_t* dir   = malloc (sizeof(wchar_t) * _MAX_DIR);
-  wchar_t* fname = malloc (sizeof(wchar_t) * _MAX_FNAME);
-  bool success = true;
-  if (_wsplitpath_s (tempFileName, drive, _MAX_DRIVE, dir, _MAX_DIR,
-                     fname, _MAX_FNAME, NULL, 0) != 0)
-    {
-      success = false;
-      maperrno ();
-    }
-  else
-    {
-      wchar_t* temp = _wcsdup (tempFileName);
-      if (wcsnlen(drive, _MAX_DRIVE) == 0)
-        swprintf_s(tempFileName, MAX_PATH, L"%s\%s%s",
-                   dir, fname, suffix);
+      wchar_t* drive = malloc (sizeof(wchar_t) * _MAX_DRIVE);
+      wchar_t* dir   = malloc (sizeof(wchar_t) * _MAX_DIR);
+      wchar_t* fname = malloc (sizeof(wchar_t) * _MAX_FNAME);
+      if (_wsplitpath_s (tempFileName, drive, _MAX_DRIVE, dir, _MAX_DIR,
+                        fname, _MAX_FNAME, NULL, 0) != 0)
+        {
+          success = false;
+          maperrno ();
+        }
       else
-        swprintf_s(tempFileName, MAX_PATH, L"%s\%s\%s%s",
-                   drive, dir, fname, suffix);
-      MoveFileW(temp, tempFileName);
-      free(temp);
-    }
+        {
+          wchar_t* temp = _wcsdup (tempFileName);
+          if (wcsnlen(drive, _MAX_DRIVE) == 0)
+            swprintf_s(tempFileName, MAX_PATH, L"%s\%s%s",
+                      dir, fname, suffix);
+          else
+            swprintf_s(tempFileName, MAX_PATH, L"%s\%s\%s%s",
+                      drive, dir, fname, suffix);
+          success
+             = MoveFileExW(temp, tempFileName, MOVEFILE_WRITE_THROUGH
+                                               | MOVEFILE_COPY_ALLOWED) != 0;
+          errno = 0;
+          if (!success && (GetLastError () != ERROR_FILE_EXISTS || --retry < 0))
+            {
+              success = false;
+              maperrno ();
+              DeleteFileW (temp);
+            }
 
-  free(drive);
-  free(dir);
-  free(fname);
+
+          free(temp);
+        }
+
+      free(drive);
+      free(dir);
+      free(fname);
+    }
 
   return success;
 }
diff --git a/cbits/fs.c b/cbits/fs.c
--- a/cbits/fs.c
+++ b/cbits/fs.c
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) Tamar Christina 2018
+ * (c) Tamar Christina 2018-2019
  *
  * Windows I/O routines for file opening.
  *
@@ -24,16 +24,30 @@
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <share.h>
+#include <errno.h>
 
+/* Duplicate a string, but in wide form. The caller is responsible for freeing
+   the result. */
+static wchar_t* FS(to_wide) (const char *path) {
+  size_t len = mbstowcs (NULL, path, 0);
+  wchar_t *w_path = malloc (sizeof (wchar_t) * (len + 1));
+  mbstowcs (w_path, path, len);
+  w_path[len] = L'\0';
+  return w_path;
+}
+
 /* This function converts Windows paths between namespaces. More specifically
    It converts an explorer style path into a NT or Win32 namespace.
-   This has several caveats but they are caviats that are native to Windows and
+   This has several caveats but they are caveats that are native to Windows and
    not POSIX. See
    https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247.aspx.
    Anything else such as raw device paths we leave untouched.  The main benefit
    of doing any of this is that we can break the MAX_PATH restriction and also
-   access raw handles that we couldn't before.  */
-static wchar_t* __hs_create_device_name (const wchar_t* filename) {
+   access raw handles that we couldn't before.
+
+   The resulting string is dynamically allocated and so callers are expected to
+   free this string.  */
+wchar_t* FS(create_device_name) (const wchar_t* filename) {
   const wchar_t* win32_dev_namespace  = L"\\\\.\\";
   const wchar_t* win32_file_namespace = L"\\\\?\\";
   const wchar_t* nt_device_namespace  = L"\\Device\\";
@@ -57,24 +71,46 @@
         result[i] = L'\\';
     }
 
+  /* We need to expand dos short paths as well.  */
+  DWORD nResult = GetLongPathNameW (result, NULL, 0) + 1;
+  wchar_t* temp = NULL;
+  if (nResult > 1)
+    {
+      temp = _wcsdup (result);
+      free (result);
+      result = malloc (nResult * sizeof (wchar_t));
+      if (GetLongPathNameW (temp, result, nResult) == 0)
+        {
+          result = memcpy (result, temp, wcslen (temp));
+          goto cleanup;
+        }
+      free (temp);
+    }
+
   /* Now resolve any . and .. in the path or subsequent API calls may fail since
      Win32 will no longer resolve them.  */
-  DWORD nResult = GetFullPathNameW (result, 0, NULL, NULL) + 1;
-  wchar_t *temp = _wcsdup (result);
+  nResult = GetFullPathNameW (result, 0, NULL, NULL) + 1;
+  temp = _wcsdup (result);
+  free (result);
   result = malloc (nResult * sizeof (wchar_t));
   if (GetFullPathNameW (temp, nResult, result, NULL) == 0)
     {
+      result = memcpy (result, temp, wcslen (temp));
       goto cleanup;
     }
 
   free (temp);
 
+  int startOffset = 0;
+  /* When remapping a network share, \\foo needs to become
+     \\?\UNC\foo and not \\?\\UNC\\foo which is an invalid path.  */
   if (wcsncmp (network_share, result, 2) == 0)
     {
       if (swprintf (ns, 10, L"%ls%ls", win32_file_namespace, unc_prefix) <= 0)
         {
           goto cleanup;
         }
+      startOffset = 2;
     }
   else if (swprintf (ns, 10, L"%ls", win32_file_namespace) <= 0)
     {
@@ -82,8 +118,9 @@
     }
 
   /* Create new string.  */
-  int bLen = wcslen (result) + wcslen (ns) + 1;
-  temp = _wcsdup (result);
+  int bLen = wcslen (result) + wcslen (ns) + 1 - startOffset;
+  temp = _wcsdup (result + startOffset);
+  free (result);
   result = malloc (bLen * sizeof (wchar_t));
   if (swprintf (result, bLen, L"%ls%ls", ns, temp) <= 0)
     {
@@ -100,23 +137,64 @@
   return NULL;
 }
 
-#define HAS_FLAG(a,b) ((a & b) == b)
+static int setErrNoFromWin32Error (void);
+/* Sets errno to the right error value and returns -1 to indicate the failure.
+   This function should only be called when the creation of the fd actually
+   failed and you want to return -1 for the fd.  */
+static
+int setErrNoFromWin32Error () {
+  switch (GetLastError()) {
+    case ERROR_SUCCESS:
+      errno = 0;
+      break;
+    case ERROR_ACCESS_DENIED:
+    case ERROR_FILE_READ_ONLY:
+      errno = EACCES;
+      break;
+    case ERROR_FILE_NOT_FOUND:
+    case ERROR_PATH_NOT_FOUND:
+      errno = ENOENT;
+      break;
+    case ERROR_FILE_EXISTS:
+      errno = EEXIST;
+      break;
+    case ERROR_NOT_ENOUGH_MEMORY:
+    case ERROR_OUTOFMEMORY:
+      errno = ENOMEM;
+      break;
+    case ERROR_INVALID_HANDLE:
+      errno = EBADF;
+      break;
+    case ERROR_INVALID_FUNCTION:
+      errno = EFAULT;
+      break;
+    default:
+      errno = EINVAL;
+      break;
+  }
+  return -1;
+}
 
+
+#define HAS_FLAG(a,b) (((a) & (b)) == (b))
+
 int FS(swopen) (const wchar_t* filename, int oflag, int shflag, int pmode)
 {
   /* Construct access mode.  */
+  /* https://docs.microsoft.com/en-us/windows/win32/fileio/file-access-rights-constants  */
   DWORD dwDesiredAccess = 0;
   if (HAS_FLAG (oflag, _O_RDONLY))
-    dwDesiredAccess |= GENERIC_READ | FILE_READ_DATA | FILE_READ_ATTRIBUTES;
+    dwDesiredAccess |= GENERIC_READ;
   if (HAS_FLAG (oflag, _O_RDWR))
-    dwDesiredAccess |= GENERIC_WRITE | GENERIC_READ | FILE_READ_DATA |
-                       FILE_WRITE_DATA | FILE_READ_ATTRIBUTES |
-                       FILE_WRITE_ATTRIBUTES;
-  if (HAS_FLAG (oflag,  _O_WRONLY))
-    dwDesiredAccess|= GENERIC_WRITE | FILE_WRITE_DATA | FILE_WRITE_ATTRIBUTES;
+    dwDesiredAccess |= GENERIC_WRITE | GENERIC_READ;
+  if (HAS_FLAG (oflag, _O_WRONLY))
+    dwDesiredAccess |= GENERIC_WRITE;
+  if (HAS_FLAG (oflag, _O_APPEND))
+    dwDesiredAccess |= FILE_APPEND_DATA;
 
   /* Construct shared mode.  */
-  DWORD dwShareMode = FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE;
+  /* https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants */
+  DWORD dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
   if (HAS_FLAG (shflag, _SH_DENYRW))
     dwShareMode &= ~(FILE_SHARE_READ | FILE_SHARE_WRITE);
   if (HAS_FLAG (shflag, _SH_DENYWR))
@@ -138,21 +216,33 @@
     }
 
   /* Create file disposition.  */
-  DWORD dwCreationDisposition = OPEN_EXISTING;
-  if (HAS_FLAG (oflag, _O_CREAT))
-    dwCreationDisposition = OPEN_ALWAYS;
+  /* https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea */
+  DWORD dwCreationDisposition = 0;
   if (HAS_FLAG (oflag, (_O_CREAT | _O_EXCL)))
-    dwCreationDisposition = CREATE_NEW;
-  if (HAS_FLAG (oflag, _O_TRUNC) && !HAS_FLAG (oflag, _O_CREAT))
-    dwCreationDisposition = TRUNCATE_EXISTING;
+    dwCreationDisposition |= CREATE_NEW;
+  else if (HAS_FLAG (oflag, _O_TRUNC | _O_CREAT))
+    dwCreationDisposition |= CREATE_ALWAYS;
+  else if (HAS_FLAG (oflag, _O_TRUNC) && !HAS_FLAG (oflag, O_RDONLY))
+    dwCreationDisposition |= TRUNCATE_EXISTING;
+  else if (HAS_FLAG (oflag, _O_APPEND | _O_CREAT))
+    dwCreationDisposition |= OPEN_ALWAYS;
+  else if (HAS_FLAG (oflag, _O_APPEND))
+    dwCreationDisposition |= OPEN_EXISTING;
+  else if (HAS_FLAG (oflag, _O_CREAT))
+    dwCreationDisposition |= OPEN_ALWAYS;
+  else
+    dwCreationDisposition |= OPEN_EXISTING;
 
   /* Set file access attributes.  */
   DWORD dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
   if (HAS_FLAG (oflag, _O_RDONLY))
     dwFlagsAndAttributes |= 0; /* No special attribute.  */
-  if (HAS_FLAG (oflag, (_O_CREAT | _O_TEMPORARY)))
-    dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE;
-  if (HAS_FLAG (oflag, (_O_CREAT | _O_SHORT_LIVED)))
+  if (HAS_FLAG (oflag, _O_TEMPORARY))
+    {
+      dwFlagsAndAttributes |= FILE_FLAG_DELETE_ON_CLOSE;
+      dwShareMode |= FILE_SHARE_DELETE;
+    }
+  if (HAS_FLAG (oflag, _O_SHORT_LIVED))
     dwFlagsAndAttributes |= FILE_ATTRIBUTE_TEMPORARY;
   if (HAS_FLAG (oflag, _O_RANDOM))
     dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
@@ -162,6 +252,11 @@
   if (dwFlagsAndAttributes != FILE_ATTRIBUTE_NORMAL)
     dwFlagsAndAttributes &= ~FILE_ATTRIBUTE_NORMAL;
 
+  /* Ensure we have shared read for files which are opened read-only. */
+  if (HAS_FLAG (dwCreationDisposition, OPEN_EXISTING)
+      && ((dwDesiredAccess & (GENERIC_WRITE|GENERIC_READ)) == GENERIC_READ))
+    dwShareMode |= FILE_SHARE_READ;
+
   /* Set security attributes.  */
   SECURITY_ATTRIBUTES securityAttributes;
   ZeroMemory (&securityAttributes, sizeof(SECURITY_ATTRIBUTES));
@@ -169,41 +264,39 @@
   securityAttributes.lpSecurityDescriptor = NULL;
   securityAttributes.nLength              = sizeof(SECURITY_ATTRIBUTES);
 
-  wchar_t* _filename = __hs_create_device_name (filename);
+  wchar_t* _filename = FS(create_device_name) (filename);
   if (!_filename)
     return -1;
 
   HANDLE hResult
     = CreateFileW (_filename, dwDesiredAccess, dwShareMode, &securityAttributes,
                    dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
   free (_filename);
   if (INVALID_HANDLE_VALUE == hResult)
-    return -1;
+    return setErrNoFromWin32Error ();
 
   /* Now we have a Windows handle, we have to convert it to an FD and apply
      the remaining flags.  */
   const int flag_mask = _O_APPEND | _O_RDONLY | _O_TEXT | _O_WTEXT;
   int fd = _open_osfhandle ((intptr_t)hResult, oflag & flag_mask);
   if (-1 == fd)
-    return -1;
+    return setErrNoFromWin32Error ();
 
   /* Finally we can change the mode to the requested one.  */
   const int mode_mask = _O_TEXT | _O_BINARY | _O_U16TEXT | _O_U8TEXT | _O_WTEXT;
   if ((oflag & mode_mask) && (-1 == _setmode (fd, oflag & mode_mask)))
-    return -1;
+    return setErrNoFromWin32Error ();
 
   return fd;
 }
 
-FILE *FS(fwopen) (const wchar_t* filename, const wchar_t* mode)
+int FS(translate_mode) (const wchar_t* mode)
 {
-  int shflag = 0;
-  int pmode  = 0;
-  int oflag  = 0;
-
+  int oflag = 0;
   int len = wcslen (mode);
   int i;
-  #define IS_EXT(X) ((i < (len - 1)) && mode[i] == X)
+  #define IS_EXT(X) ((i < (len - 1)) && mode[i+1] == X)
 
   for (i = 0; i < len; i++)
     {
@@ -261,27 +354,235 @@
     }
   #undef IS_EXT
 
+  return oflag;
+}
+
+FILE *FS(fwopen) (const wchar_t* filename, const wchar_t* mode)
+{
+  int shflag = 0;
+  int pmode  = 0;
+  int oflag  = FS(translate_mode) (mode);
+
   int fd = FS(swopen) (filename, oflag, shflag, pmode);
+  if (fd < 0)
+    return NULL;
+
   FILE* file = _wfdopen (fd, mode);
   return file;
 }
 
 FILE *FS(fopen) (const char* filename, const char* mode)
 {
-  size_t len = mbstowcs (NULL, filename, 0);
-  wchar_t *w_filename = malloc (sizeof (wchar_t) * (len + 1));
-  mbstowcs (w_filename, filename, len);
-  w_filename[len] = L'\0';
-
-  len = mbstowcs (NULL, mode, 0);
-  wchar_t *w_mode = malloc (sizeof (wchar_t) * (len + 1));
-  mbstowcs (w_mode, mode, len);
-  w_mode[len] = L'\0';
+  wchar_t * const w_filename = FS(to_wide) (filename);
+  wchar_t * const w_mode = FS(to_wide) (mode);
 
   FILE *result = FS(fwopen) (w_filename, w_mode);
   free (w_filename);
   free (w_mode);
+
   return result;
+}
+
+int FS(sopen) (const char* filename, int oflag, int shflag, int pmode)
+{
+  wchar_t * const w_filename = FS(to_wide) (filename);
+  int result = FS(swopen) (w_filename, oflag, shflag, pmode);
+  free (w_filename);
+
+  return result;
+}
+
+int FS(_stat) (const char *path, struct _stat *buffer)
+{
+  wchar_t * const w_path = FS(to_wide) (path);
+  int result = FS(_wstat) (w_path, buffer);
+  free (w_path);
+
+  return result;
+}
+
+int FS(_stat64) (const char *path, struct __stat64 *buffer)
+{
+  wchar_t * const w_path = FS(to_wide) (path);
+  int result = FS(_wstat64) (w_path, buffer);
+  free (w_path);
+
+  return result;
+}
+
+static __time64_t ftToPosix(FILETIME ft)
+{
+  // takes the last modified date
+  LARGE_INTEGER date, adjust;
+  date.HighPart = ft.dwHighDateTime;
+  date.LowPart = ft.dwLowDateTime;
+
+  /* 100-nanoseconds = milliseconds * 10000.  */
+  /* A UNIX timestamp contains the number of seconds from Jan 1, 1970, while the
+     FILETIME documentation says: Contains a 64-bit value representing the
+     number of 100-nanosecond intervals since January 1, 1601 (UTC).
+
+     Between Jan 1, 1601 and Jan 1, 1970 there are 11644473600 seconds */
+  adjust.QuadPart = 11644473600000 * 10000;
+
+  /* removes the diff between 1970 and 1601.  */
+  date.QuadPart -= adjust.QuadPart;
+
+  /* converts back from 100-nanoseconds to seconds.  */
+  return (__time64_t)date.QuadPart / 10000000;
+}
+
+int FS(_wstat) (const wchar_t *path, struct _stat *buffer)
+{
+  ZeroMemory (buffer, sizeof (struct _stat));
+  wchar_t* _path = FS(create_device_name) (path);
+  if (!_path)
+    return -1;
+
+    /* Construct shared mode.  */
+  DWORD dwShareMode = FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE;
+  DWORD dwDesiredAccess = FILE_READ_ATTRIBUTES;
+  DWORD dwFlagsAndAttributes = FILE_FLAG_BACKUP_SEMANTICS;
+  DWORD dwCreationDisposition = OPEN_EXISTING;
+
+  SECURITY_ATTRIBUTES securityAttributes;
+  ZeroMemory (&securityAttributes, sizeof(SECURITY_ATTRIBUTES));
+  securityAttributes.bInheritHandle       = false;
+  securityAttributes.lpSecurityDescriptor = NULL;
+  securityAttributes.nLength              = sizeof(SECURITY_ATTRIBUTES);
+
+  HANDLE hResult
+    = CreateFileW (_path, dwDesiredAccess, dwShareMode, &securityAttributes,
+                   dwCreationDisposition, dwFlagsAndAttributes, NULL);
+
+  if (INVALID_HANDLE_VALUE == hResult)
+    {
+      free (_path);
+      return setErrNoFromWin32Error ();
+    }
+
+  WIN32_FILE_ATTRIBUTE_DATA finfo;
+  ZeroMemory (&finfo, sizeof (WIN32_FILE_ATTRIBUTE_DATA));
+  if(!GetFileAttributesExW (_path, GetFileExInfoStandard, &finfo))
+    {
+      free (_path);
+      CloseHandle (hResult);
+      return setErrNoFromWin32Error ();
+    }
+
+  unsigned short mode = _S_IREAD;
+
+  if (finfo.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+    mode |= (_S_IFDIR | _S_IEXEC);
+  else
+  {
+    mode |= _S_IFREG;
+    DWORD type;
+    if (GetBinaryTypeW (_path, &type))
+      mode |= _S_IEXEC;
+  }
+
+  if (!(finfo.dwFileAttributes & FILE_ATTRIBUTE_READONLY))
+    mode |= _S_IWRITE;
+
+  buffer->st_mode  = mode;
+  buffer->st_nlink = 1;
+  buffer->st_size  = ((uint64_t)finfo.nFileSizeHigh << 32) + finfo.nFileSizeLow;
+  buffer->st_atime = ftToPosix (finfo.ftLastAccessTime);
+  buffer->st_mtime = buffer->st_ctime = ftToPosix (finfo.ftLastWriteTime);
+  free (_path);
+  CloseHandle (hResult);
+  return 0;
+}
+
+int FS(_wstat64) (const wchar_t *path, struct __stat64 *buffer)
+{
+  struct _stat buf;
+  ZeroMemory (buffer, sizeof (struct __stat64));
+
+  int result = FS(_wstat) (path, &buf);
+
+  buffer->st_mode = buf.st_mode;
+  buffer->st_nlink = 1;
+  buffer->st_size = buf.st_size;
+  buffer->st_atime = buf.st_atime;
+  buffer->st_mtime = buf.st_mtime;
+
+  return result;
+}
+
+int FS(_wrename) (const wchar_t *from, const wchar_t *to)
+{
+  wchar_t* const _from = FS(create_device_name) (from);
+  if (!_from)
+    return -1;
+
+  wchar_t* const _to = FS(create_device_name) (to);
+  if (!_to)
+    {
+      free (_from);
+      return -1;
+    }
+
+  if (MoveFileW(_from, _to) == 0) {
+    free (_from);
+    free (_to);
+    return setErrNoFromWin32Error ();
+  }
+
+
+  free (_from);
+  free (_to);
+  return 0;
+}
+
+int FS(rename) (const char *from, const char *to)
+{
+  wchar_t * const w_from = FS(to_wide) (from);
+  wchar_t * const w_to = FS(to_wide) (to);
+  int result = FS(_wrename) (w_from, w_to);
+  free(w_from);
+  free(w_to);
+
+  return result;
+}
+
+int FS(unlink) (const char *filename)
+{
+  return FS(_unlink) (filename);
+}
+
+int FS(_unlink) (const char *filename)
+{
+  wchar_t * const w_filename = FS(to_wide) (filename);
+  int result = FS(_wunlink) (w_filename);
+  free(w_filename);
+
+  return result;
+}
+
+int FS(_wunlink) (const wchar_t *filename)
+{
+  wchar_t* const _filename = FS(create_device_name) (filename);
+  if (!_filename)
+    return -1;
+
+  if (DeleteFileW(_filename) == 0) {
+    free (_filename);
+    return setErrNoFromWin32Error ();
+  }
+
+
+  free (_filename);
+  return 0;
+}
+int FS(remove) (const char *path)
+{
+  return FS(_unlink) (path);
+}
+int FS(_wremove) (const wchar_t *path)
+{
+  return FS(_wunlink) (path);
 }
 #else
 FILE *FS(fopen) (const char* filename, const char* mode)
diff --git a/cbits/inputReady.c b/cbits/inputReady.c
--- a/cbits/inputReady.c
+++ b/cbits/inputReady.c
@@ -9,7 +9,7 @@
  * Thus we raise it here (before any #include of network-related headers)
  * to 1024 so that at least those programs would work that would work on
  * Linux if that used select() (luckily it uses poll() by now).
- * See https://ghc.haskell.org/trac/ghc/ticket/13497#comment:23
+ * See https://gitlab.haskell.org/ghc/ghc/issues/13497#note_140304
  * The real solution would be to remove all uses of select()
  * on Windows, too, and use IO Completion Ports instead.
  * Note that on Windows, one can simply define FD_SETSIZE to the desired
@@ -22,10 +22,10 @@
 
 /* select and supporting types is not Posix */
 /* #include "PosixSource.h" */
+#include "Rts.h"
 #include <limits.h>
 #include <stdbool.h>
 #include "HsBase.h"
-#include "Rts.h"
 #if !defined(_WIN32)
 #include <poll.h>
 #endif
@@ -141,7 +141,7 @@
  * reliably on Linux when the fd is a not-O_NONBLOCK socket, so if you pass
  * socket fds to this function, ensure they have O_NONBLOCK;
  * see `man 2 poll` and `man 2 select`, and
- * https://ghc.haskell.org/trac/ghc/ticket/13497#comment:26).
+ * https://gitlab.haskell.org/ghc/ghc/issues/13497#note_140309).
  *
  * This function blocks until either `msecs` have passed, or input is
  * available.
diff --git a/cbits/md5.c b/cbits/md5.c
--- a/cbits/md5.c
+++ b/cbits/md5.c
@@ -20,9 +20,9 @@
 #include <string.h>
 
 void __hsbase_MD5Init(struct MD5Context *context);
-void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len);
-void __hsbase_MD5Final(byte digest[16], struct MD5Context *context);
-void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]);
+void __hsbase_MD5Update(struct MD5Context *context, uint8_t const *buf, int len);
+void __hsbase_MD5Final(uint8_t digest[16], struct MD5Context *context);
+void __hsbase_MD5Transform(uint32_t buf[4], uint32_t const in[16]);
 
 
 /*
@@ -30,12 +30,12 @@
  * MD5 spec.  Note: this code works regardless of the byte order.
  */
 static void
-byteSwap(word32 *buf, unsigned words)
+byteSwap(uint32_t *buf, unsigned words)
 {
-	byte *p = (byte *)buf;
+	uint8_t *p = (uint8_t *)buf;
 
 	do {
-		*buf++ = (word32)((unsigned)p[3] << 8 | p[2]) << 16 |
+		*buf++ = (uint32_t)((unsigned)p[3] << 8 | p[2]) << 16 |
 			((unsigned)p[1] << 8 | p[0]);
 		p += 4;
 	} while (--words);
@@ -62,9 +62,9 @@
  * of bytes.
  */
 void
-__hsbase_MD5Update(struct MD5Context *ctx, byte const *buf, int len)
+__hsbase_MD5Update(struct MD5Context *ctx, uint8_t const *buf, int len)
 {
-	word32 t;
+	uint32_t t;
 
 	/* Update byte count */
 
@@ -74,11 +74,11 @@
 
 	t = 64 - (t & 0x3f);	/* Space available in ctx->in (at least 1) */
 	if ((unsigned)t > len) {
-		memcpy((byte *)ctx->in + 64 - (unsigned)t, buf, len);
+		memcpy((uint8_t *)ctx->in + 64 - (unsigned)t, buf, len);
 		return;
 	}
 	/* First chunk is an odd size */
-	memcpy((byte *)ctx->in + 64 - (unsigned)t, buf, (unsigned)t);
+	memcpy((uint8_t *)ctx->in + 64 - (unsigned)t, buf, (unsigned)t);
 	byteSwap(ctx->in, 16);
         __hsbase_MD5Transform(ctx->buf, ctx->in);
 	buf += (unsigned)t;
@@ -102,10 +102,10 @@
  * 1 0* (64-bit count of bits processed, MSB-first)
  */
 void
-__hsbase_MD5Final(byte digest[16], struct MD5Context *ctx)
+__hsbase_MD5Final(uint8_t digest[16], struct MD5Context *ctx)
 {
 	int count = (int)(ctx->bytes[0] & 0x3f); /* Bytes in ctx->in */
-	byte *p = (byte *)ctx->in + count;	/* First unused byte */
+	uint8_t *p = (uint8_t *)ctx->in + count;	/* First unused byte */
 
 	/* Set the first char of padding to 0x80.  There is always room. */
 	*p++ = 0x80;
@@ -117,7 +117,7 @@
 		memset(p, 0, count+8);
 		byteSwap(ctx->in, 16);
                 __hsbase_MD5Transform(ctx->buf, ctx->in);
-		p = (byte *)ctx->in;
+		p = (uint8_t *)ctx->in;
 		count = 56;
 	}
 	memset(p, 0, count+8);
@@ -153,9 +153,9 @@
  */
 
 void
-__hsbase_MD5Transform(word32 buf[4], word32 const in[16])
+__hsbase_MD5Transform(uint32_t buf[4], uint32_t const in[16])
 {
-	register word32 a, b, c, d;
+	register uint32_t a, b, c, d;
 
 	a = buf[0];
 	b = buf[1];
diff --git a/changelog.md b/changelog.md
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,50 @@
 # Changelog for [`base` package](http://hackage.haskell.org/package/base)
 
+## 4.14.0.0 *Jan 2020
+  * Bundled with GHC 8.10.1
+
+  * Add a `TestEquality` instance for the `Compose` newtype.
+
+  * `Data.Ord.Down` now has a field name, `getDown`
+
+  * Add `Bits`, `Bounded`, `Enum`, `FiniteBits`, `Floating`, `Fractional`,
+    `Integral`, `Ix`, `Real`, `RealFrac`, `RealFloat` and `Storable` instances
+    to `Data.Ord.Down`.
+
+  * Fix the `integer-gmp` variant of `isValidNatural`: Previously it would fail
+    to detect values `<= maxBound::Word` that were incorrectly encoded using
+    the `NatJ#` constructor.
+
+  * The type of `coerce` has been generalized. It is now runtime-representation
+    polymorphic:
+    `forall {r :: RuntimeRep} (a :: TYPE r) (b :: TYPE r). Coercible a b => a -> b`.
+    The type argument `r` is marked as `Inferred` to prevent it from
+    interfering with visible type application.
+
+  * Make `Fixed` and `HasResolution` poly-kinded.
+
+  * Add `HasResolution` instances for `Nat`s.
+
+  * Add `Functor`, `Applicative`, `Monad`, `Alternative`, `MonadPlus`,
+    `Generic` and `Generic1` instances to `Kleisli`
+
+  * `openTempFile` is now fully atomic and thread-safe on Windows.
+
+  * Add `isResourceVanishedError`, `resourceVanishedErrorType`, and
+    `isResourceVanishedErrorType` to `System.IO.Error`.
+
+  * Add newtypes for `CSocklen` (`socklen_t`) and `CNfds` (`nfds_t`) to
+    `System.Posix.Types`.
+
+  * Add `Functor`, `Applicative` and `Monad` instances to `(,,) a b`
+    and `(,,,) a b c`.
+
+  * Add `resizeSmallMutableArray#` to `GHC.Exts`.
+
+  * Add a `Data` instance to `WrappedArrow`, `WrappedMonad`, and `ZipList`.
+
+  * Add `IsList` instance for `ZipList`.
+
 ## 4.13.0.0 *July 2019*
   * Bundled with GHC 8.8.1
 
@@ -29,7 +74,7 @@
     `Word`, and `WordN` now throw an overflow exception for negative shift
     values (instead of being undefined behaviour).
 
-  * `scanr` no longer participates in list fusion (due #16943)
+  * `scanr` no longer crashes when passed a fusable, infinite list. (#16943)
 
 ## 4.12.0.0 *21 September 2018*
   * Bundled with GHC 8.6.1
diff --git a/config.guess b/config.guess
--- a/config.guess
+++ b/config.guess
@@ -2,7 +2,7 @@
 # Attempt to guess a canonical system name.
 #   Copyright 1992-2019 Free Software Foundation, Inc.
 
-timestamp='2019-03-04'
+timestamp='2019-12-21'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -99,6 +99,8 @@
 trap 'test -z "$tmp" || rm -fr "$tmp"' 0 1 2 13 15
 
 set_cc_for_build() {
+    # prevent multiple calls if $tmp is already set
+    test "$tmp" && return 0
     : "${TMPDIR=/tmp}"
     # shellcheck disable=SC2039
     { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
@@ -262,6 +264,9 @@
     *:SolidBSD:*:*)
 	echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
 	exit ;;
+    *:OS108:*:*)
+	echo "$UNAME_MACHINE"-unknown-os108_"$UNAME_RELEASE"
+	exit ;;
     macppc:MirBSD:*:*)
 	echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
 	exit ;;
@@ -271,12 +276,15 @@
     *:Sortix:*:*)
 	echo "$UNAME_MACHINE"-unknown-sortix
 	exit ;;
+    *:Twizzler:*:*)
+	echo "$UNAME_MACHINE"-unknown-twizzler
+	exit ;;
     *:Redox:*:*)
 	echo "$UNAME_MACHINE"-unknown-redox
 	exit ;;
     mips:OSF1:*.*)
-        echo mips-dec-osf1
-        exit ;;
+	echo mips-dec-osf1
+	exit ;;
     alpha:OSF1:*:*)
 	case $UNAME_RELEASE in
 	*4.0)
@@ -918,7 +926,7 @@
 	echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
 	exit ;;
     alpha:Linux:*:*)
-	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 2>/dev/null` in
 	  EV5)   UNAME_MACHINE=alphaev5 ;;
 	  EV56)  UNAME_MACHINE=alphaev56 ;;
 	  PCA56) UNAME_MACHINE=alphapca56 ;;
@@ -1325,38 +1333,39 @@
 	echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
 	exit ;;
     *:Darwin:*:*)
-	UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
-	set_cc_for_build
-	if test "$UNAME_PROCESSOR" = unknown ; then
-	    UNAME_PROCESSOR=powerpc
+	UNAME_PROCESSOR=`uname -p`
+	case $UNAME_PROCESSOR in
+	    unknown) UNAME_PROCESSOR=powerpc ;;
+	esac
+	if command -v xcode-select > /dev/null 2> /dev/null && \
+		! xcode-select --print-path > /dev/null 2> /dev/null ; then
+	    # Avoid executing cc if there is no toolchain installed as
+	    # cc will be a stub that puts up a graphical alert
+	    # prompting the user to install developer tools.
+	    CC_FOR_BUILD=no_compiler_found
+	else
+	    set_cc_for_build
 	fi
-	if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
-	    if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
-		if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
-		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		       grep IS_64BIT_ARCH >/dev/null
-		then
-		    case $UNAME_PROCESSOR in
-			i386) UNAME_PROCESSOR=x86_64 ;;
-			powerpc) UNAME_PROCESSOR=powerpc64 ;;
-		    esac
-		fi
-		# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
-		if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
-		       (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
-		       grep IS_PPC >/dev/null
-		then
-		    UNAME_PROCESSOR=powerpc
-		fi
+	if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
+	    if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_64BIT_ARCH >/dev/null
+	    then
+		case $UNAME_PROCESSOR in
+		    i386) UNAME_PROCESSOR=x86_64 ;;
+		    powerpc) UNAME_PROCESSOR=powerpc64 ;;
+		esac
 	    fi
+	    # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
+	    if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
+		   (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
+		   grep IS_PPC >/dev/null
+	    then
+		UNAME_PROCESSOR=powerpc
+	    fi
 	elif test "$UNAME_PROCESSOR" = i386 ; then
-	    # Avoid executing cc on OS X 10.9, as it ships with a stub
-	    # that puts up a graphical alert prompting to install
-	    # developer tools.  Any system running Mac OS X 10.7 or
-	    # later (Darwin 11 and later) is required to have a 64-bit
-	    # processor. This is not true of the ARM version of Darwin
-	    # that Apple uses in portable devices.
-	    UNAME_PROCESSOR=x86_64
+	    # uname -m returns i386 or x86_64
+	    UNAME_PROCESSOR=$UNAME_MACHINE
 	fi
 	echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
 	exit ;;
@@ -1468,6 +1477,14 @@
 #include <sys/types.h>
 #include <sys/utsname.h>
 #endif
+#if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
+#if defined (vax) || defined (__vax) || defined (__vax__) || defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
+#include <signal.h>
+#if defined(_SIZE_T_) || defined(SIGLOST)
+#include <sys/utsname.h>
+#endif
+#endif
+#endif
 main ()
 {
 #if defined (sony)
@@ -1555,18 +1572,23 @@
   printf ("vax-dec-bsd\n"); exit (0);
 #endif
 #else
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname un;
+  uname (&un);
+  printf ("vax-dec-ultrix%s\n", un.release); exit (0);
+#else
   printf ("vax-dec-ultrix\n"); exit (0);
 #endif
 #endif
+#endif
 #if defined(ultrix) || defined(_ultrix) || defined(__ultrix) || defined(__ultrix__)
 #if defined(mips) || defined(__mips) || defined(__mips__) || defined(MIPS) || defined(__MIPS__)
-#include <signal.h>
-#if defined(_SIZE_T_) /* >= ULTRIX4 */
-  printf ("mips-dec-ultrix4\n"); exit (0);
+#if defined(_SIZE_T_) || defined(SIGLOST)
+  struct utsname *un;
+  uname (&un);
+  printf ("mips-dec-ultrix%s\n", un.release); exit (0);
 #else
-#if defined(ULTRIX3) || defined(ultrix3) || defined(SIGLOST)
-  printf ("mips-dec-ultrix3\n"); exit (0);
-#endif
+  printf ("mips-dec-ultrix\n"); exit (0);
 #endif
 #endif
 #endif
diff --git a/config.sub b/config.sub
--- a/config.sub
+++ b/config.sub
@@ -2,7 +2,7 @@
 # Configuration validation subroutine script.
 #   Copyright 1992-2019 Free Software Foundation, Inc.
 
-timestamp='2019-01-05'
+timestamp='2019-06-30'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -337,17 +337,14 @@
 				basic_machine=m88k-harris
 				os=sysv3
 				;;
-			hp300)
+			hp300 | hp300hpux)
 				basic_machine=m68k-hp
+				os=hpux
 				;;
 			hp300bsd)
 				basic_machine=m68k-hp
 				os=bsd
 				;;
-			hp300hpux)
-				basic_machine=m68k-hp
-				os=hpux
-				;;
 			hppaosf)
 				basic_machine=hppa1.1-hp
 				os=osf
@@ -360,10 +357,6 @@
 				basic_machine=i386-mach
 				os=mach
 				;;
-			vsta)
-				basic_machine=i386-pc
-				os=vsta
-				;;
 			isi68 | isi)
 				basic_machine=m68k-isi
 				os=sysv
@@ -612,6 +605,10 @@
 				basic_machine=vax-dec
 				os=vms
 				;;
+			vsta)
+				basic_machine=i386-pc
+				os=vsta
+				;;
 			vxworks960)
 				basic_machine=i960-wrs
 				os=vxworks
@@ -1172,7 +1169,7 @@
 			| asmjs \
 			| ba \
 			| be32 | be64 \
-			| bfin | bs2000 \
+			| bfin | bpf | bs2000 \
 			| c[123]* | c30 | [cjt]90 | c4x \
 			| c8051 | clipper | craynv | csky | cydra \
 			| d10v | d30v | dlx | dsp16xx \
@@ -1346,11 +1343,11 @@
 	     | hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
 	     | sym* | kopensolaris* | plan9* \
 	     | amigaos* | amigados* | msdos* | newsos* | unicos* | aof* \
-	     | aos* | aros* | cloudabi* | sortix* \
+	     | aos* | aros* | cloudabi* | sortix* | twizzler* \
 	     | nindy* | vxsim* | vxworks* | ebmon* | hms* | mvs* \
 	     | clix* | riscos* | uniplus* | iris* | isc* | rtu* | xenix* \
 	     | knetbsd* | mirbsd* | netbsd* \
-	     | bitrig* | openbsd* | solidbsd* | libertybsd* \
+	     | bitrig* | openbsd* | solidbsd* | libertybsd* | os108* \
 	     | ekkobsd* | kfreebsd* | freebsd* | riscix* | lynxos* \
 	     | bosx* | nextstep* | cxux* | aout* | elf* | oabi* \
 	     | ptx* | coff* | ecoff* | winnt* | domain* | vsta* \
@@ -1368,7 +1365,8 @@
 	     | powermax* | dnix* | nx6 | nx7 | sei* | dragonfly* \
 	     | skyos* | haiku* | rdos* | toppers* | drops* | es* \
 	     | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \
-	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi*)
+	     | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \
+	     | nsk* | powerunix)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	qnx*)
@@ -1451,9 +1449,6 @@
 		;;
 	ns2)
 		os=nextstep2
-		;;
-	nsk*)
-		os=nsk
 		;;
 	# Preserve the version number of sinix5.
 	sinix5.*)
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -668,27782 +668,31526 @@
 docdir
 oldincludedir
 includedir
-runstatedir
-localstatedir
-sharedstatedir
-sysconfdir
-datadir
-datarootdir
-libexecdir
-sbindir
-bindir
-program_transform_name
-prefix
-exec_prefix
-PACKAGE_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_largefile
-with_iconv_includes
-with_iconv_libraries
-with_libcharset
-'
-      ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-
-
-# Initialize some variables set by options.
-ac_init_help=
-ac_init_version=false
-ac_unrecognized_opts=
-ac_unrecognized_sep=
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-cache_file=/dev/null
-exec_prefix=NONE
-no_create=
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-verbose=
-x_includes=NONE
-x_libraries=NONE
-
-# Installation directory options.
-# These are left unexpanded so users can "make install exec_prefix=/foo"
-# and all the variables that are supposed to be based on exec_prefix
-# by default will actually change.
-# Use braces instead of parens because sh, perl, etc. also accept them.
-# (The list follows the same order as the GNU Coding Standards.)
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datarootdir='${prefix}/share'
-datadir='${datarootdir}'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-runstatedir='${localstatedir}/run'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
-infodir='${datarootdir}/info'
-htmldir='${docdir}'
-dvidir='${docdir}'
-pdfdir='${docdir}'
-psdir='${docdir}'
-libdir='${exec_prefix}/lib'
-localedir='${datarootdir}/locale'
-mandir='${datarootdir}/man'
-
-ac_prev=
-ac_dashdash=
-for ac_option
-do
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval $ac_prev=\$ac_option
-    ac_prev=
-    continue
-  fi
-
-  case $ac_option in
-  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *=)   ac_optarg= ;;
-  *)    ac_optarg=yes ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case $ac_dashdash$ac_option in
-  --)
-    ac_dashdash=yes ;;
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir=$ac_optarg ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build_alias ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build_alias=$ac_optarg ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file=$ac_optarg ;;
-
-  --config-cache | -C)
-    cache_file=config.cache ;;
-
-  -datadir | --datadir | --datadi | --datad)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=*)
-    datadir=$ac_optarg ;;
-
-  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
-  | --dataroo | --dataro | --datar)
-    ac_prev=datarootdir ;;
-  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
-  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
-    datarootdir=$ac_optarg ;;
-
-  -disable-* | --disable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=no ;;
-
-  -docdir | --docdir | --docdi | --doc | --do)
-    ac_prev=docdir ;;
-  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
-    docdir=$ac_optarg ;;
-
-  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
-    ac_prev=dvidir ;;
-  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
-    dvidir=$ac_optarg ;;
-
-  -enable-* | --enable-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid feature name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"enable_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval enable_$ac_useropt=\$ac_optarg ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix=$ac_optarg ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he | -h)
-    ac_init_help=long ;;
-  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
-    ac_init_help=recursive ;;
-  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
-    ac_init_help=short ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host_alias ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host_alias=$ac_optarg ;;
-
-  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
-    ac_prev=htmldir ;;
-  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
-  | --ht=*)
-    htmldir=$ac_optarg ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir=$ac_optarg ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir=$ac_optarg ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir=$ac_optarg ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir=$ac_optarg ;;
-
-  -localedir | --localedir | --localedi | --localed | --locale)
-    ac_prev=localedir ;;
-  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
-    localedir=$ac_optarg ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst | --locals)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
-    localstatedir=$ac_optarg ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir=$ac_optarg ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c | -n)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir=$ac_optarg ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix=$ac_optarg ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix=$ac_optarg ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix=$ac_optarg ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name=$ac_optarg ;;
-
-  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
-    ac_prev=pdfdir ;;
-  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
-    pdfdir=$ac_optarg ;;
-
-  -psdir | --psdir | --psdi | --psd | --ps)
-    ac_prev=psdir ;;
-  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
-    psdir=$ac_optarg ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -runstatedir | --runstatedir | --runstatedi | --runstated \
-  | --runstate | --runstat | --runsta | --runst | --runs \
-  | --run | --ru | --r)
-    ac_prev=runstatedir ;;
-  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
-  | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
-  | --run=* | --ru=* | --r=*)
-    runstatedir=$ac_optarg ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir=$ac_optarg ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir=$ac_optarg ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site=$ac_optarg ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir=$ac_optarg ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir=$ac_optarg ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target_alias ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target_alias=$ac_optarg ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers | -V)
-    ac_init_version=: ;;
-
-  -with-* | --with-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=\$ac_optarg ;;
-
-  -without-* | --without-*)
-    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
-    # Reject names that are not valid shell variable names.
-    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error $? "invalid package name: $ac_useropt"
-    ac_useropt_orig=$ac_useropt
-    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
-    case $ac_user_opts in
-      *"
-"with_$ac_useropt"
-"*) ;;
-      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
-	 ac_unrecognized_sep=', ';;
-    esac
-    eval with_$ac_useropt=no ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes=$ac_optarg ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries=$ac_optarg ;;
-
-  -*) as_fn_error $? "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information"
-    ;;
-
-  *=*)
-    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
-    # Reject names that are not valid shell variable names.
-    case $ac_envvar in #(
-      '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
-    esac
-    eval $ac_envvar=\$ac_optarg
-    export $ac_envvar ;;
-
-  *)
-    # FIXME: should be removed in autoconf 3.0.
-    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
-    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
-      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
-    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error $? "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
-  case $enable_option_checking in
-    no) ;;
-    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
-    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
-  esac
-fi
-
-# Check all directory arguments for consistency.
-for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
-		datadir sysconfdir sharedstatedir localstatedir includedir \
-		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
-		libdir localedir mandir runstatedir
-do
-  eval ac_val=\$$ac_var
-  # Remove trailing slashes.
-  case $ac_val in
-    */ )
-      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
-      eval $ac_var=\$ac_val;;
-  esac
-  # Be sure to have absolute directory names.
-  case $ac_val in
-    [\\/$]* | ?:[\\/]* )  continue;;
-    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
-  esac
-  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
-done
-
-# There might be people who depend on the old broken behavior: `$host'
-# used to hold the argument of --host etc.
-# FIXME: To remove some day.
-build=$build_alias
-host=$host_alias
-target=$target_alias
-
-# FIXME: To remove some day.
-if test "x$host_alias" != x; then
-  if test "x$build_alias" = x; then
-    cross_compiling=maybe
-  elif test "x$build_alias" != "x$host_alias"; then
-    cross_compiling=yes
-  fi
-fi
-
-ac_tool_prefix=
-test -n "$host_alias" && ac_tool_prefix=$host_alias-
-
-test "$silent" = yes && exec 6>/dev/null
-
-
-ac_pwd=`pwd` && test -n "$ac_pwd" &&
-ac_ls_di=`ls -di .` &&
-ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error $? "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error $? "pwd does not report name of working directory"
-
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then the parent directory.
-  ac_confdir=`$as_dirname -- "$as_myself" ||
-$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
-	 X"$as_myself" : 'X\(//\)[^/]' \| \
-	 X"$as_myself" : 'X\(//\)$' \| \
-	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$as_myself" |
-    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)[^/].*/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\/\)$/{
-	    s//\1/
-	    q
-	  }
-	  /^X\(\/\).*/{
-	    s//\1/
-	    q
-	  }
-	  s/.*/./; q'`
-  srcdir=$ac_confdir
-  if test ! -r "$srcdir/$ac_unique_file"; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r "$srcdir/$ac_unique_file"; then
-  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
-	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
-	pwd)`
-# When building in place, set srcdir=.
-if test "$ac_abs_confdir" = "$ac_pwd"; then
-  srcdir=.
-fi
-# Remove unnecessary trailing slashes from srcdir.
-# Double slashes in file names in object file debugging info
-# mess up M-x gdb in Emacs.
-case $srcdir in
-*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
-esac
-for ac_var in $ac_precious_vars; do
-  eval ac_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_env_${ac_var}_value=\$${ac_var}
-  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
-  eval ac_cv_env_${ac_var}_value=\$${ac_var}
-done
-
-#
-# Report the --help message.
-#
-if test "$ac_init_help" = "long"; then
-  # Omit some internal or obsolete options to make the list less imposing.
-  # This message is too long to be a string in the A/UX 3.1 sh.
-  cat <<_ACEOF
-\`configure' configures Haskell base package 1.0 to adapt to many kinds of systems.
-
-Usage: $0 [OPTION]... [VAR=VALUE]...
-
-To assign environment variables (e.g., CC, CFLAGS...), specify them as
-VAR=VALUE.  See below for descriptions of some of the useful variables.
-
-Defaults for the options are specified in brackets.
-
-Configuration:
-  -h, --help              display this help and exit
-      --help=short        display options specific to this package
-      --help=recursive    display the short help of all the included packages
-  -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking ...' messages
-      --cache-file=FILE   cache test results in FILE [disabled]
-  -C, --config-cache      alias for \`--cache-file=config.cache'
-  -n, --no-create         do not create output files
-      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
-
-Installation directories:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [PREFIX]
-
-By default, \`make install' will install all the files in
-\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
-an installation prefix other than \`$ac_default_prefix' using \`--prefix',
-for instance \`--prefix=\$HOME'.
-
-For better control, use the options below.
-
-Fine tuning of the installation directories:
-  --bindir=DIR            user executables [EPREFIX/bin]
-  --sbindir=DIR           system admin executables [EPREFIX/sbin]
-  --libexecdir=DIR        program executables [EPREFIX/libexec]
-  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
-  --runstatedir=DIR       modifiable per-process data [LOCALSTATEDIR/run]
-  --libdir=DIR            object code libraries [EPREFIX/lib]
-  --includedir=DIR        C header files [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
-  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
-  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
-  --infodir=DIR           info documentation [DATAROOTDIR/info]
-  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
-  --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/base]
-  --htmldir=DIR           html documentation [DOCDIR]
-  --dvidir=DIR            dvi documentation [DOCDIR]
-  --pdfdir=DIR            pdf documentation [DOCDIR]
-  --psdir=DIR             ps documentation [DOCDIR]
-_ACEOF
-
-  cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
-  --target=TARGET   configure for building compilers for TARGET [HOST]
-_ACEOF
-fi
-
-if test -n "$ac_init_help"; then
-  case $ac_init_help in
-     short | recursive ) echo "Configuration of Haskell base package 1.0:";;
-   esac
-  cat <<\_ACEOF
-
-Optional Features:
-  --disable-option-checking  ignore unrecognized --enable/--with options
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --disable-largefile     omit support for large files
-
-Optional Packages:
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --with-iconv-includes   directory containing iconv.h
-  --with-iconv-libraries  directory containing iconv library
-  --with-libcharset       Use libcharset [default=only if available]
-
-Some influential environment variables:
-  CC          C compiler command
-  CFLAGS      C compiler flags
-  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
-              nonstandard directory <lib dir>
-  LIBS        libraries to pass to the linker, e.g. -l<library>
-  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
-              you have headers in a nonstandard directory <include dir>
-  CPP         C preprocessor
-
-Use these variables to override the choices made by `configure' or to help
-it to find libraries and programs with nonstandard names/locations.
-
-Report bugs to <libraries@haskell.org>.
-_ACEOF
-ac_status=$?
-fi
-
-if test "$ac_init_help" = "recursive"; then
-  # If there are subdirs, report their specific --help.
-  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
-    test -d "$ac_dir" ||
-      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
-      continue
-    ac_builddir=.
-
-case "$ac_dir" in
-.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
-*)
-  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
-  # A ".." for each directory in $ac_dir_suffix.
-  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
-  case $ac_top_builddir_sub in
-  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
-  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
-  esac ;;
-esac
-ac_abs_top_builddir=$ac_pwd
-ac_abs_builddir=$ac_pwd$ac_dir_suffix
-# for backward compatibility:
-ac_top_builddir=$ac_top_build_prefix
-
-case $srcdir in
-  .)  # We are building in place.
-    ac_srcdir=.
-    ac_top_srcdir=$ac_top_builddir_sub
-    ac_abs_top_srcdir=$ac_pwd ;;
-  [\\/]* | ?:[\\/]* )  # Absolute name.
-    ac_srcdir=$srcdir$ac_dir_suffix;
-    ac_top_srcdir=$srcdir
-    ac_abs_top_srcdir=$srcdir ;;
-  *) # Relative name.
-    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
-    ac_top_srcdir=$ac_top_build_prefix$srcdir
-    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
-esac
-ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
-
-    cd "$ac_dir" || { ac_status=$?; continue; }
-    # Check for guested configure.
-    if test -f "$ac_srcdir/configure.gnu"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
-    elif test -f "$ac_srcdir/configure"; then
-      echo &&
-      $SHELL "$ac_srcdir/configure" --help=recursive
-    else
-      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
-    fi || ac_status=$?
-    cd "$ac_pwd" || { ac_status=$?; break; }
-  done
-fi
-
-test -n "$ac_init_help" && exit $ac_status
-if $ac_init_version; then
-  cat <<\_ACEOF
-Haskell base package configure 1.0
-generated by GNU Autoconf 2.69
-
-Copyright (C) 2012 Free Software Foundation, Inc.
-This configure script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it.
-_ACEOF
-  exit
-fi
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext
-  if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } > conftest.i && {
-	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-    ac_retval=1
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if eval \${$3+:} false; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
-  # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_header_compiler=yes
-else
-  ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  ac_header_preproc=yes
-else
-  ac_header_preproc=no
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So?  What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
-  yes:no: )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-    ;;
-  no:yes:* )
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( $as_echo "## ------------------------------------ ##
-## Report this to libraries@haskell.org ##
-## ------------------------------------ ##"
-     ) | sed "s/^/$as_me: WARNING:     /" >&2
-    ;;
-esac
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: program exited with status $ac_status" >&5
-       $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-       ac_retval=$ac_status
-fi
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  eval "$3=no"
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof ($2))
-	 return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
-	    return 0;
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  eval "$3=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_type
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  rm -f conftest.$ac_objext conftest$ac_exeext
-  if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    grep -v '^ *+' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-    mv -f conftest.er1 conftest.err
-  fi
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest$ac_exeext && {
-	 test "$cross_compiling" = yes ||
-	 test -x conftest$ac_exeext
-       }; then :
-  ac_retval=0
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_retval=1
-fi
-  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
-  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
-  # interfere with the next link command; also delete a directory that is
-  # left behind by Apple's compiler.  We do this before executing the actions.
-  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_func
-
-# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
-# --------------------------------------------
-# Tries to find the compile-time value of EXPR in a program that includes
-# INCLUDES, setting VAR accordingly. Returns whether the value could be
-# computed
-ac_fn_c_compute_int ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  if test "$cross_compiling" = yes; then
-    # Depending upon the size, compute the lo and hi bounds.
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=0 ac_mid=0
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid; break
-else
-  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
-			if test $ac_lo -le $ac_mid; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) < 0)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=-1 ac_mid=-1
-  while :; do
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) >= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_lo=$ac_mid; break
-else
-  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
-			if test $ac_mid -le $ac_hi; then
-			  ac_lo= ac_hi=
-			  break
-			fi
-			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  done
-else
-  ac_lo= ac_hi=
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
-  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-static int test_array [1 - 2 * !(($2) <= $ac_mid)];
-test_array [0] = 0;
-return test_array [0];
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_hi=$ac_mid
-else
-  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in #((
-?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
-'') ac_retval=1 ;;
-esac
-  else
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-static long int longval () { return $2; }
-static unsigned long int ulongval () { return $2; }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
-  FILE *f = fopen ("conftest.val", "w");
-  if (! f)
-    return 1;
-  if (($2) < 0)
-    {
-      long int i = longval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%ld", i);
-    }
-  else
-    {
-      unsigned long int i = ulongval ();
-      if (i != ($2))
-	return 1;
-      fprintf (f, "%lu", i);
-    }
-  /* Do not output a trailing newline, as this causes \r\n confusion
-     on some platforms.  */
-  return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
-else
-  ac_retval=1
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-rm -f conftest.val
-
-  fi
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-  as_fn_set_status $ac_retval
-
-} # ac_fn_c_compute_int
-
-# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
-# ---------------------------------------------
-# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
-# accordingly.
-ac_fn_c_check_decl ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  as_decl_name=`echo $2|sed 's/ *(.*//'`
-  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
-$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
-if eval \${$3+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-$4
-int
-main ()
-{
-#ifndef $as_decl_name
-#ifdef __cplusplus
-  (void) $as_decl_use;
-#else
-  (void) $as_decl_name;
-#endif
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
-
-} # ac_fn_c_check_decl
-cat >config.log <<_ACEOF
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-
-It was created by Haskell base package $as_me 1.0, which was
-generated by GNU Autoconf 2.69.  Invocation command line was
-
-  $ $0 $@
-
-_ACEOF
-exec 5>>config.log
-{
-cat <<_ASUNAME
-## --------- ##
-## Platform. ##
-## --------- ##
-
-hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
-/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
-
-/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
-/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
-/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
-/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
-/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
-/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
-
-_ASUNAME
-
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    $as_echo "PATH: $as_dir"
-  done
-IFS=$as_save_IFS
-
-} >&5
-
-cat >&5 <<_ACEOF
-
-
-## ----------- ##
-## Core tests. ##
-## ----------- ##
-
-_ACEOF
-
-
-# Keep a trace of the command line.
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Strip out --silent because we don't want to record it for future runs.
-# Also quote any args containing shell meta-characters.
-# Make two passes to allow for proper duplicate-argument suppression.
-ac_configure_args=
-ac_configure_args0=
-ac_configure_args1=
-ac_must_keep_next=false
-for ac_pass in 1 2
-do
-  for ac_arg
-  do
-    case $ac_arg in
-    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
-    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-    | -silent | --silent | --silen | --sile | --sil)
-      continue ;;
-    *\'*)
-      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
-    esac
-    case $ac_pass in
-    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
-    2)
-      as_fn_append ac_configure_args1 " '$ac_arg'"
-      if test $ac_must_keep_next = true; then
-	ac_must_keep_next=false # Got value, back to normal.
-      else
-	case $ac_arg in
-	  *=* | --config-cache | -C | -disable-* | --disable-* \
-	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
-	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
-	  | -with-* | --with-* | -without-* | --without-* | --x)
-	    case "$ac_configure_args0 " in
-	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
-	    esac
-	    ;;
-	  -* ) ac_must_keep_next=true ;;
-	esac
-      fi
-      as_fn_append ac_configure_args " '$ac_arg'"
-      ;;
-    esac
-  done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset ac_configure_args1;}
-
-# When interrupted or exit'd, cleanup temporary files, and complete
-# config.log.  We remove comments because anyway the quotes in there
-# would cause problems or look ugly.
-# WARNING: Use '\'' to represent an apostrophe within the trap.
-# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
-trap 'exit_status=$?
-  # Save into config.log some information that might help in debugging.
-  {
-    echo
-
-    $as_echo "## ---------------- ##
-## Cache variables. ##
-## ---------------- ##"
-    echo
-    # The following way of writing the cache mishandles newlines in values,
-(
-  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
-    eval ac_val=\$$ac_var
-    case $ac_val in #(
-    *${as_nl}*)
-      case $ac_var in #(
-      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
-$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
-      esac
-      case $ac_var in #(
-      _ | IFS | as_nl) ;; #(
-      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
-      *) { eval $ac_var=; unset $ac_var;} ;;
-      esac ;;
-    esac
-  done
-  (set) 2>&1 |
-    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
-    *${as_nl}ac_space=\ *)
-      sed -n \
-	"s/'\''/'\''\\\\'\'''\''/g;
-	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
-      ;; #(
-    *)
-      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
-      ;;
-    esac |
-    sort
-)
-    echo
-
-    $as_echo "## ----------------- ##
-## Output variables. ##
-## ----------------- ##"
-    echo
-    for ac_var in $ac_subst_vars
-    do
-      eval ac_val=\$$ac_var
-      case $ac_val in
-      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-      esac
-      $as_echo "$ac_var='\''$ac_val'\''"
-    done | sort
-    echo
-
-    if test -n "$ac_subst_files"; then
-      $as_echo "## ------------------- ##
-## File substitutions. ##
-## ------------------- ##"
-      echo
-      for ac_var in $ac_subst_files
-      do
-	eval ac_val=\$$ac_var
-	case $ac_val in
-	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
-	esac
-	$as_echo "$ac_var='\''$ac_val'\''"
-      done | sort
-      echo
-    fi
-
-    if test -s confdefs.h; then
-      $as_echo "## ----------- ##
-## confdefs.h. ##
-## ----------- ##"
-      echo
-      cat confdefs.h
-      echo
-    fi
-    test "$ac_signal" != 0 &&
-      $as_echo "$as_me: caught signal $ac_signal"
-    $as_echo "$as_me: exit $exit_status"
-  } >&5
-  rm -f core *.core core.conftest.* &&
-    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
-    exit $exit_status
-' 0
-for ac_signal in 1 2 13 15; do
-  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
-done
-ac_signal=0
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -f -r conftest* confdefs.h
-
-$as_echo "/* confdefs.h */" > confdefs.h
-
-# Predefined preprocessor variables.
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_NAME "$PACKAGE_NAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_VERSION "$PACKAGE_VERSION"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_STRING "$PACKAGE_STRING"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_ACEOF
-
-
-# Let the site file select an alternate cache file if it wants to.
-# Prefer an explicitly selected file to automatically selected ones.
-ac_site_file1=NONE
-ac_site_file2=NONE
-if test -n "$CONFIG_SITE"; then
-  # We do not want a PATH search for config.site.
-  case $CONFIG_SITE in #((
-    -*)  ac_site_file1=./$CONFIG_SITE;;
-    */*) ac_site_file1=$CONFIG_SITE;;
-    *)   ac_site_file1=./$CONFIG_SITE;;
-  esac
-elif test "x$prefix" != xNONE; then
-  ac_site_file1=$prefix/share/config.site
-  ac_site_file2=$prefix/etc/config.site
-else
-  ac_site_file1=$ac_default_prefix/share/config.site
-  ac_site_file2=$ac_default_prefix/etc/config.site
-fi
-for ac_site_file in "$ac_site_file1" "$ac_site_file2"
-do
-  test "x$ac_site_file" = xNONE && continue
-  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
-$as_echo "$as_me: loading site script $ac_site_file" >&6;}
-    sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file" \
-      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5; }
-  fi
-done
-
-if test -r "$cache_file"; then
-  # Some versions of bash will fail to source /dev/null (special files
-  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
-  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
-$as_echo "$as_me: loading cache $cache_file" >&6;}
-    case $cache_file in
-      [\\/]* | ?:[\\/]* ) . "$cache_file";;
-      *)                      . "./$cache_file";;
-    esac
-  fi
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
-  >$cache_file
-fi
-
-# Check that the precious variables saved in the cache have kept the same
-# value.
-ac_cache_corrupted=false
-for ac_var in $ac_precious_vars; do
-  eval ac_old_set=\$ac_cv_env_${ac_var}_set
-  eval ac_new_set=\$ac_env_${ac_var}_set
-  eval ac_old_val=\$ac_cv_env_${ac_var}_value
-  eval ac_new_val=\$ac_env_${ac_var}_value
-  case $ac_old_set,$ac_new_set in
-    set,)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,set)
-      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
-$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
-      ac_cache_corrupted=: ;;
-    ,);;
-    *)
-      if test "x$ac_old_val" != "x$ac_new_val"; then
-	# differences in whitespace do not lead to failure.
-	ac_old_val_w=`echo x $ac_old_val`
-	ac_new_val_w=`echo x $ac_new_val`
-	if test "$ac_old_val_w" != "$ac_new_val_w"; then
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
-$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
-	  ac_cache_corrupted=:
-	else
-	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
-$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
-	  eval $ac_var=\$ac_old_val
-	fi
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
-$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
-	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
-$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
-      fi;;
-  esac
-  # Pass precious variables to config.status.
-  if test "$ac_new_set" = set; then
-    case $ac_new_val in
-    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
-    *) ac_arg=$ac_var=$ac_new_val ;;
-    esac
-    case " $ac_configure_args " in
-      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
-      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
-    esac
-  fi
-done
-if $ac_cache_corrupted; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
-$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-
-# Safety check: Ensure that we are in the correct source directory.
-
-
-ac_config_headers="$ac_config_headers include/HsBaseConfig.h include/EventConfig.h"
-
-
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-  if test -f "$ac_dir/install-sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f "$ac_dir/install.sh"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  elif test -f "$ac_dir/shtool"; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/shtool install -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-fi
-
-# These three variables are undocumented and unsupported,
-# and are intended to be withdrawn in a future Autoconf release.
-# They can cause serious problems if a builder's source tree is in a directory
-# whose full name contains unusual characters.
-ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
-ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
-ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if ${ac_cv_build+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if ${ac_cv_host+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
-$as_echo_n "checking target system type... " >&6; }
-if ${ac_cv_target+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test "x$target_alias" = x; then
-  ac_cv_target=$ac_cv_host
-else
-  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
-    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
-$as_echo "$ac_cv_target" >&6; }
-case $ac_cv_target in
-*-*-*) ;;
-*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
-esac
-target=$ac_cv_target
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_target
-shift
-target_cpu=$1
-target_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-target_os=$*
-IFS=$ac_save_IFS
-case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
-
-
-# The aliases save the names the user supplied, while $host etc.
-# will get canonicalized.
-test -n "$target_alias" &&
-  test "$program_prefix$program_suffix$program_transform_name" = \
-    NONENONEs,x,x, &&
-  program_prefix=${target_alias}-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_CC"; then
-  ac_ct_CC=$CC
-  # Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="gcc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-else
-  CC="$ac_cv_prog_CC"
-fi
-
-if test -z "$CC"; then
-          if test -n "$ac_tool_prefix"; then
-    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
-set dummy ${ac_tool_prefix}cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="${ac_tool_prefix}cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  fi
-fi
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  ac_prog_rejected=no
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
-       ac_prog_rejected=yes
-       continue
-     fi
-    ac_cv_prog_CC="cc"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# != 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
-  fi
-fi
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$CC"; then
-  if test -n "$ac_tool_prefix"; then
-  for ac_prog in cl.exe
-  do
-    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
-set dummy $ac_tool_prefix$ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-CC=$ac_cv_prog_CC
-if test -n "$CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-    test -n "$CC" && break
-  done
-fi
-if test -z "$CC"; then
-  ac_ct_CC=$CC
-  for ac_prog in cl.exe
-do
-  # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_prog_ac_ct_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_CC"; then
-  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_prog_ac_ct_CC="$ac_prog"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_CC=$ac_cv_prog_ac_ct_CC
-if test -n "$ac_ct_CC"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-  test -n "$ac_ct_CC" && break
-done
-
-  if test "x$ac_ct_CC" = x; then
-    CC=""
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
-ac_tool_warned=yes ;;
-esac
-    CC=$ac_ct_CC
-  fi
-fi
-
-fi
-
-
-test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
-  { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
-  ac_status=$?
-  if test -s conftest.err; then
-    sed '10a\
-... rest of stderr output deleted ...
-         10q' conftest.err >conftest.er1
-    cat conftest.er1 >&5
-  fi
-  rm -f conftest.er1 conftest.err
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
-# Try to create an executable without -o first, disregard a.out.
-# It will help us diagnose broken compilers, and finding out an intuition
-# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
-
-# The possible output files:
-ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
-
-ac_rmfiles=
-for ac_file in $ac_files
-do
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
-  esac
-done
-rm -f $ac_rmfiles
-
-if { { ac_try="$ac_link_default"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link_default") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
-# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
-# in a Makefile.  We should not override ac_cv_exeext if it was cached,
-# so that the user can short-circuit this test for compilers unknown to
-# Autoconf.
-for ac_file in $ac_files ''
-do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
-	;;
-    [ab].out )
-	# We found the default executable, but exeext='' is most
-	# certainly right.
-	break;;
-    *.* )
-	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
-	then :; else
-	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	fi
-	# We set ac_cv_exeext here because the later test for it is not
-	# safe: cross compilers may not add the suffix if given an `-o'
-	# argument, so we may need to know it at that point already.
-	# Even if this section looks crufty: it has the advantage of
-	# actually working.
-	break;;
-    * )
-	break;;
-  esac
-done
-test "$ac_cv_exeext" = no && ac_cv_exeext=
-
-else
-  ac_file=''
-fi
-if test -z "$ac_file"; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "C compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
-$as_echo_n "checking for suffix of executables... " >&6; }
-if { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  # If both `conftest.exe' and `conftest' are `present' (well, observable)
-# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
-# work properly (i.e., refer to `conftest.exe'), while it won't with
-# `rm'.
-for ac_file in conftest.exe conftest conftest.*; do
-  test -f "$ac_file" || continue
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
-    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
-	  break;;
-    * ) break;;
-  esac
-done
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
-  ;
-  return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run.  If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
-  { { ac_try="$ac_link"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_link") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }
-  if { ac_try='./conftest$ac_cv_exeext'
-  { { case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_try") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; }; then
-    cross_compiling=no
-  else
-    if test "$cross_compiling" = maybe; then
-	cross_compiling=yes
-    else
-	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5; }
-    fi
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
-$as_echo_n "checking for suffix of object files... " >&6; }
-if ${ac_cv_objext+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.o conftest.obj
-if { { ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
-  (eval "$ac_compile") 2>&5
-  ac_status=$?
-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
-  test $ac_status = 0; }; then :
-  for ac_file in conftest.o conftest.obj conftest.*; do
-  test -f "$ac_file" || continue;
-  case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
-    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
-       break;;
-  esac
-done
-else
-  $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
-$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if ${ac_cv_c_compiler_gnu+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-#ifndef __GNUC__
-       choke me
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_compiler_gnu=yes
-else
-  ac_compiler_gnu=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-ac_cv_c_compiler_gnu=$ac_compiler_gnu
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
-$as_echo "$ac_cv_c_compiler_gnu" >&6; }
-if test $ac_compiler_gnu = yes; then
-  GCC=yes
-else
-  GCC=
-fi
-ac_test_CFLAGS=${CFLAGS+set}
-ac_save_CFLAGS=$CFLAGS
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
-$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if ${ac_cv_prog_cc_g+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_save_c_werror_flag=$ac_c_werror_flag
-   ac_c_werror_flag=yes
-   ac_cv_prog_cc_g=no
-   CFLAGS="-g"
-   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-else
-  CFLAGS=""
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
-  ac_c_werror_flag=$ac_save_c_werror_flag
-	 CFLAGS="-g"
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_g=yes
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-   ac_c_werror_flag=$ac_save_c_werror_flag
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
-$as_echo "$ac_cv_prog_cc_g" >&6; }
-if test "$ac_test_CFLAGS" = set; then
-  CFLAGS=$ac_save_CFLAGS
-elif test $ac_cv_prog_cc_g = yes; then
-  if test "$GCC" = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-g"
-  fi
-else
-  if test "$GCC" = yes; then
-    CFLAGS="-O2"
-  else
-    CFLAGS=
-  fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
-$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if ${ac_cv_prog_cc_c89+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_prog_cc_c89=no
-ac_save_CC=$CC
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdarg.h>
-#include <stdio.h>
-struct stat;
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-
-/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
-   function prototypes and stuff, but not '\xHH' hex character constants.
-   These don't provoke an error unfortunately, instead are silently treated
-   as 'x'.  The following induces an error, until -std is added to get
-   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
-   array size at least.  It's necessary to write '\x00'==0 to get something
-   that's true only with -std.  */
-int osf4_cc_array ['\x00' == 0 ? 1 : -1];
-
-/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
-   inside strings and character constants.  */
-#define FOO(x) 'x'
-int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
-
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-int
-main ()
-{
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-  ;
-  return 0;
-}
-_ACEOF
-for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
-	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_prog_cc_c89=$ac_arg
-fi
-rm -f core conftest.err conftest.$ac_objext
-  test "x$ac_cv_prog_cc_c89" != "xno" && break
-done
-rm -f conftest.$ac_ext
-CC=$ac_save_CC
-
-fi
-# AC_CACHE_VAL
-case "x$ac_cv_prog_cc_c89" in
-  x)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
-  xno)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
-  *)
-    CC="$CC $ac_cv_prog_cc_c89"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
-$as_echo_n "checking how to run the C preprocessor... " >&6; }
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-  if ${ac_cv_prog_CPP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-      # Double quotes because CPP needs to be expanded
-    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
-    do
-      ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-  break
-fi
-
-    done
-    ac_cv_prog_CPP=$CPP
-
-fi
-  CPP=$ac_cv_prog_CPP
-else
-  ac_cv_prog_CPP=$CPP
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
-$as_echo "$CPP" >&6; }
-ac_preproc_ok=false
-for ac_c_preproc_warn_flag in '' yes
-do
-  # Use a header file that comes with gcc, so configuring glibc
-  # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp. "Syntax error" is here to catch this case.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-		     Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
-  # Broken: fails on valid input.
-continue
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-  # OK, works on sane cases.  Now check whether nonexistent headers
-  # can be detected and how.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-  # Broken: success on invalid input.
-continue
-else
-  # Passes both tests.
-ac_preproc_ok=:
-break
-fi
-rm -f conftest.err conftest.i conftest.$ac_ext
-
-done
-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
-rm -f conftest.i conftest.err conftest.$ac_ext
-if $ac_preproc_ok; then :
-
-else
-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5; }
-fi
-
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
-$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if ${ac_cv_path_GREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if test -z "$GREP"; then
-  ac_path_GREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in grep ggrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_GREP" || continue
-# Check for GNU ac_path_GREP and select it if it is found.
-  # Check for GNU $ac_path_GREP
-case `"$ac_path_GREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'GREP' >> "conftest.nl"
-    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_GREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_GREP="$ac_path_GREP"
-      ac_path_GREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_GREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_GREP"; then
-    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
-$as_echo_n "checking for egrep... " >&6; }
-if ${ac_cv_path_EGREP+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
-   then ac_cv_path_EGREP="$GREP -E"
-   else
-     if test -z "$EGREP"; then
-  ac_path_EGREP_found=false
-  # Loop through the user's path and test for each of PROGNAME-LIST
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_prog in egrep; do
-    for ac_exec_ext in '' $ac_executable_extensions; do
-      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      as_fn_executable_p "$ac_path_EGREP" || continue
-# Check for GNU ac_path_EGREP and select it if it is found.
-  # Check for GNU $ac_path_EGREP
-case `"$ac_path_EGREP" --version 2>&1` in
-*GNU*)
-  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
-*)
-  ac_count=0
-  $as_echo_n 0123456789 >"conftest.in"
-  while :
-  do
-    cat "conftest.in" "conftest.in" >"conftest.tmp"
-    mv "conftest.tmp" "conftest.in"
-    cp "conftest.in" "conftest.nl"
-    $as_echo 'EGREP' >> "conftest.nl"
-    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
-    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
-    as_fn_arith $ac_count + 1 && ac_count=$as_val
-    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
-      # Best one so far, save it but keep looking for a better one
-      ac_cv_path_EGREP="$ac_path_EGREP"
-      ac_path_EGREP_max=$ac_count
-    fi
-    # 10*(2^10) chars as input seems more than enough
-    test $ac_count -gt 10 && break
-  done
-  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
-esac
-
-      $ac_path_EGREP_found && break 3
-    done
-  done
-  done
-IFS=$as_save_IFS
-  if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
-  fi
-else
-  ac_cv_path_EGREP=$EGREP
-fi
-
-   fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-# On IRIX 5.3, sys/types and inttypes.h are conflicting.
-for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
-		  inttypes.h stdint.h unistd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
-if test "x$ac_cv_header_minix_config_h" = xyes; then :
-  MINIX=yes
-else
-  MINIX=
-fi
-
-
-  if test "$MINIX" = yes; then
-
-$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
-
-
-$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
-
-
-$as_echo "#define _MINIX 1" >>confdefs.h
-
-  fi
-
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
-$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
-if ${ac_cv_safe_to_define___extensions__+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#         define __EXTENSIONS__ 1
-          $ac_includes_default
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_safe_to_define___extensions__=yes
-else
-  ac_cv_safe_to_define___extensions__=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
-$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
-  test $ac_cv_safe_to_define___extensions__ = yes &&
-    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
-
-  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
-
-  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
-
-  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WINDOWS platform" >&5
-$as_echo_n "checking for WINDOWS platform... " >&6; }
-case $host in
-    *mingw32*|*mingw64*|*cygwin*|*msys*)
-        WINDOWS=YES;;
-    *)
-        WINDOWS=NO;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDOWS" >&5
-$as_echo "$WINDOWS" >&6; }
-
-# do we have long longs?
-ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
-if test "x$ac_cv_type_long_long" = xyes; then :
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_LONG_LONG 1
-_ACEOF
-
-
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
-$as_echo_n "checking for ANSI C header files... " >&6; }
-if ${ac_cv_header_stdc+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_header_stdc=yes
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <string.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "memchr" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "free" >/dev/null 2>&1; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-  if test "$cross_compiling" = yes; then :
-  :
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <ctype.h>
-#include <stdlib.h>
-#if ((' ' & 0x0FF) == 0x020)
-# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#else
-# define ISLOWER(c) \
-		   (('a' <= (c) && (c) <= 'i') \
-		     || ('j' <= (c) && (c) <= 'r') \
-		     || ('s' <= (c) && (c) <= 'z'))
-# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
-#endif
-
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int
-main ()
-{
-  int i;
-  for (i = 0; i < 256; i++)
-    if (XOR (islower (i), ISLOWER (i))
-	|| toupper (i) != TOUPPER (i))
-      return 2;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
-  ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
-  conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-
-# check for specific header (.h) files that we are interested in
-for ac_header in ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.h sys/resource.h sys/select.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/wait.h termios.h time.h unistd.h utime.h windows.h winsock.h langinfo.h poll.h sys/epoll.h sys/event.h sys/eventfd.h
-do :
-  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-# Enable large file support. Do this before testing the types ino_t, off_t, and
-# rlim_t, because it will affect the result of that test.
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then :
-  enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if ${ac_cv_sys_largefile_CC+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_cv_sys_largefile_CC=no
-     if test "$GCC" != yes; then
-       ac_save_CC=$CC
-       while :; do
-	 # IRIX 6.2 and later do not support large files by default,
-	 # so use the C compiler's -n32 option if that helps.
-	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  break
-fi
-rm -f core conftest.err conftest.$ac_objext
-	 CC="$CC -n32"
-	 if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_largefile_CC=' -n32'; break
-fi
-rm -f core conftest.err conftest.$ac_objext
-	 break
-       done
-       CC=$ac_save_CC
-       rm -f conftest.$ac_ext
-    fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
-  if test "$ac_cv_sys_largefile_CC" != no; then
-    CC=$CC$ac_cv_sys_largefile_CC
-  fi
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if ${ac_cv_sys_file_offset_bits+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_file_offset_bits=64; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_file_offset_bits=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  if test $ac_cv_sys_file_offset_bits = unknown; then
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if ${ac_cv_sys_large_files+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  while :; do
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=no; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
-    We can't simply define LARGE_OFF_T to be 9223372036854775807,
-    since some C++ compilers masquerading as C compilers
-    incorrectly reject 9223372036854775807.  */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31))
-  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-		       && LARGE_OFF_T % 2147483647 == 1)
-		      ? 1 : -1];
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  ac_cv_sys_large_files=1; break
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-  ac_cv_sys_large_files=unknown
-  break
-done
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
-  no | unknown) ;;
-  *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
-_ACEOF
-;;
-esac
-rm -rf conftest*
-  fi
-
-
-fi
-
-
-for ac_header in wctype.h
-do :
-  ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
-if test "x$ac_cv_header_wctype_h" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_WCTYPE_H 1
-_ACEOF
- for ac_func in iswspace
-do :
-  ac_fn_c_check_func "$LINENO" "iswspace" "ac_cv_func_iswspace"
-if test "x$ac_cv_func_iswspace" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_ISWSPACE 1
-_ACEOF
-
-fi
-done
-
-fi
-
-done
-
-
-for ac_func in lstat
-do :
-  ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
-if test "x$ac_cv_func_lstat" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LSTAT 1
-_ACEOF
-
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
-$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
-if ${ac_cv_lib_rt_clock_gettime+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lrt  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clock_gettime ();
-int
-main ()
-{
-return clock_gettime ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_rt_clock_gettime=yes
-else
-  ac_cv_lib_rt_clock_gettime=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
-$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
-if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBRT 1
-_ACEOF
-
-  LIBS="-lrt $LIBS"
-
-fi
-
-for ac_func in clock_gettime
-do :
-  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
-if test "x$ac_cv_func_clock_gettime" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_CLOCK_GETTIME 1
-_ACEOF
-
-fi
-done
-
-for ac_func in getclock getrusage times
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-for ac_func in _chsize ftruncate
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-for ac_func in epoll_ctl eventfd kevent kevent64 kqueue poll
-do :
-  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
-  cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-done
-
-
-# event-related fun
-
-if test "$ac_cv_header_sys_epoll_h" = yes && test "$ac_cv_func_epoll_ctl" = yes; then
-
-$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
-
-fi
-
-if test "$ac_cv_header_sys_event_h" = yes && test "$ac_cv_func_kqueue" = yes; then
-
-$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
-
-
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of kev.filter" >&5
-$as_echo_n "checking size of kev.filter... " >&6; }
-if ${ac_cv_sizeof_kev_filter+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (kev.filter))" "ac_cv_sizeof_kev_filter"        "#include <sys/event.h>
-struct kevent kev;
-"; then :
-
-else
-  if test "$ac_cv_type_kev_filter" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (kev.filter)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_kev_filter=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_kev_filter" >&5
-$as_echo "$ac_cv_sizeof_kev_filter" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_KEV_FILTER $ac_cv_sizeof_kev_filter
-_ACEOF
-
-
-
-  # The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of kev.flags" >&5
-$as_echo_n "checking size of kev.flags... " >&6; }
-if ${ac_cv_sizeof_kev_flags+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (kev.flags))" "ac_cv_sizeof_kev_flags"        "#include <sys/event.h>
-struct kevent kev;
-"; then :
-
-else
-  if test "$ac_cv_type_kev_flags" = yes; then
-     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error 77 "cannot compute sizeof (kev.flags)
-See \`config.log' for more details" "$LINENO" 5; }
-   else
-     ac_cv_sizeof_kev_flags=0
-   fi
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_kev_flags" >&5
-$as_echo "$ac_cv_sizeof_kev_flags" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_KEV_FLAGS $ac_cv_sizeof_kev_flags
-_ACEOF
-
-
-fi
-
-if test "$ac_cv_header_poll_h" = yes && test "$ac_cv_func_poll" = yes; then
-
-$as_echo "#define HAVE_POLL 1" >>confdefs.h
-
-fi
-
-# Linux open file descriptor locks
-ac_fn_c_check_decl "$LINENO" "F_OFD_SETLK" "ac_cv_have_decl_F_OFD_SETLK" "$ac_includes_default"
-if test "x$ac_cv_have_decl_F_OFD_SETLK" = xyes; then :
-
-
-$as_echo "#define HAVE_OFD_LOCKING 1" >>confdefs.h
-
-
-fi
-
-
-# flock
-for ac_func in flock
-do :
-  ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
-if test "x$ac_cv_func_flock" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_FLOCK 1
-_ACEOF
-
-fi
-done
-
-if test "$ac_cv_header_sys_file_h" = yes && test "$ac_cv_func_flock" = yes; then
-
-$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
-
-fi
-
-# unsetenv
-for ac_func in unsetenv
-do :
-  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
-if test "x$ac_cv_func_unsetenv" = xyes; then :
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_UNSETENV 1
-_ACEOF
-
-fi
-done
-
-
-###  POSIX.1003.1 unsetenv returns 0 or -1 (EINVAL), but older implementations
-###  in common use return void.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of unsetenv" >&5
-$as_echo_n "checking return type of unsetenv... " >&6; }
-if ${fptools_cv_func_unsetenv_return_type+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <stdlib.h>
-
-_ACEOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  $EGREP "void[      ]+unsetenv" >/dev/null 2>&1; then :
-  fptools_cv_func_unsetenv_return_type=void
-else
-  fptools_cv_func_unsetenv_return_type=int
-fi
-rm -f conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_func_unsetenv_return_type" >&5
-$as_echo "$fptools_cv_func_unsetenv_return_type" >&6; }
-case "$fptools_cv_func_unsetenv_return_type" in
-  "void" )
-
-$as_echo "#define UNSETENV_RETURNS_VOID 1" >>confdefs.h
-
-  ;;
-esac
-
-
-
-# Check whether --with-iconv-includes was given.
-if test "${with_iconv_includes+set}" = set; then :
-  withval=$with_iconv_includes; ICONV_INCLUDE_DIRS=$withval; CPPFLAGS="-I$withval $CPPFLAGS"
-else
-  ICONV_INCLUDE_DIRS=
-fi
-
-
-
-# Check whether --with-iconv-libraries was given.
-if test "${with_iconv_libraries+set}" = set; then :
-  withval=$with_iconv_libraries; ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval $LDFLAGS"
-else
-  ICONV_LIB_DIRS=
-fi
-
-
-
-
-
-# map standard C types and ISO types to Haskell types
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for char" >&5
-$as_echo_n "checking Haskell type for char... " >&6; }
-    if ${fptools_cv_htype_char+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_char=yes
-        if ac_fn_c_compute_int "$LINENO" "(char)0.2 - (char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-char val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_char="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_char=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_char=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_char=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_char=LDouble
-                else
-                    fptools_cv_htype_sup_char=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((char)(-1)) < ((char)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_char=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(char) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_char=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_char="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_char="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_char" = no
-    then
-
-        fptools_cv_htype_char=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_char" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_char" >&5
-$as_echo "$fptools_cv_htype_char" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_CHAR $fptools_cv_htype_char
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for signed char" >&5
-$as_echo_n "checking Haskell type for signed char... " >&6; }
-    if ${fptools_cv_htype_signed_char+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_signed_char=yes
-        if ac_fn_c_compute_int "$LINENO" "(signed char)0.2 - (signed char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-signed char val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_signed_char="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_signed_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_signed_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_signed_char=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_signed_char=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_signed_char=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_signed_char=LDouble
-                else
-                    fptools_cv_htype_sup_signed_char=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((signed char)(-1)) < ((signed char)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_signed_char=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_signed_char=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_signed_char="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_signed_char="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_signed_char" = no
-    then
-
-        fptools_cv_htype_signed_char=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_signed_char" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_signed_char" >&5
-$as_echo "$fptools_cv_htype_signed_char" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SIGNED_CHAR $fptools_cv_htype_signed_char
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned char" >&5
-$as_echo_n "checking Haskell type for unsigned char... " >&6; }
-    if ${fptools_cv_htype_unsigned_char+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_unsigned_char=yes
-        if ac_fn_c_compute_int "$LINENO" "(unsigned char)0.2 - (unsigned char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-unsigned char val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_unsigned_char="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_char=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_char=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_unsigned_char=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_char=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_char=LDouble
-                else
-                    fptools_cv_htype_sup_unsigned_char=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((unsigned char)(-1)) < ((unsigned char)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_char=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_char=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_unsigned_char="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_unsigned_char="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_unsigned_char" = no
-    then
-
-        fptools_cv_htype_unsigned_char=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_unsigned_char" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_char" >&5
-$as_echo "$fptools_cv_htype_unsigned_char" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UNSIGNED_CHAR $fptools_cv_htype_unsigned_char
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for short" >&5
-$as_echo_n "checking Haskell type for short... " >&6; }
-    if ${fptools_cv_htype_short+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_short=yes
-        if ac_fn_c_compute_int "$LINENO" "(short)0.2 - (short)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-short val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_short="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_short=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_short=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_short=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_short=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_short=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_short=LDouble
-                else
-                    fptools_cv_htype_sup_short=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((short)(-1)) < ((short)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_short=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(short) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_short=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_short="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_short="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_short" = no
-    then
-
-        fptools_cv_htype_short=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_short" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_short" >&5
-$as_echo "$fptools_cv_htype_short" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SHORT $fptools_cv_htype_short
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned short" >&5
-$as_echo_n "checking Haskell type for unsigned short... " >&6; }
-    if ${fptools_cv_htype_unsigned_short+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_unsigned_short=yes
-        if ac_fn_c_compute_int "$LINENO" "(unsigned short)0.2 - (unsigned short)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-unsigned short val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_unsigned_short="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_short=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_short=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_short=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_unsigned_short=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_short=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_short=LDouble
-                else
-                    fptools_cv_htype_sup_unsigned_short=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((unsigned short)(-1)) < ((unsigned short)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_short=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_short=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_unsigned_short="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_unsigned_short="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_unsigned_short" = no
-    then
-
-        fptools_cv_htype_unsigned_short=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_unsigned_short" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_short" >&5
-$as_echo "$fptools_cv_htype_unsigned_short" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UNSIGNED_SHORT $fptools_cv_htype_unsigned_short
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for int" >&5
-$as_echo_n "checking Haskell type for int... " >&6; }
-    if ${fptools_cv_htype_int+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_int=yes
-        if ac_fn_c_compute_int "$LINENO" "(int)0.2 - (int)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-int val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_int="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_int=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_int=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_int=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_int=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_int=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_int=LDouble
-                else
-                    fptools_cv_htype_sup_int=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((int)(-1)) < ((int)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_int=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(int) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_int=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_int="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_int="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_int" = no
-    then
-
-        fptools_cv_htype_int=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_int" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_int" >&5
-$as_echo "$fptools_cv_htype_int" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_INT $fptools_cv_htype_int
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned int" >&5
-$as_echo_n "checking Haskell type for unsigned int... " >&6; }
-    if ${fptools_cv_htype_unsigned_int+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_unsigned_int=yes
-        if ac_fn_c_compute_int "$LINENO" "(unsigned int)0.2 - (unsigned int)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-unsigned int val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_unsigned_int="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_int=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_int=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_int=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_unsigned_int=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_int=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_int=LDouble
-                else
-                    fptools_cv_htype_sup_unsigned_int=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((unsigned int)(-1)) < ((unsigned int)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_int=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_int=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_unsigned_int="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_unsigned_int="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_unsigned_int" = no
-    then
-
-        fptools_cv_htype_unsigned_int=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_unsigned_int" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_int" >&5
-$as_echo "$fptools_cv_htype_unsigned_int" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UNSIGNED_INT $fptools_cv_htype_unsigned_int
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for long" >&5
-$as_echo_n "checking Haskell type for long... " >&6; }
-    if ${fptools_cv_htype_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_long=yes
-        if ac_fn_c_compute_int "$LINENO" "(long)0.2 - (long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-long val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_long="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_long=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_long=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_long=LDouble
-                else
-                    fptools_cv_htype_sup_long=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((long)(-1)) < ((long)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(long) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_long="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_long="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_long" = no
-    then
-
-        fptools_cv_htype_long=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_long" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_long" >&5
-$as_echo "$fptools_cv_htype_long" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_LONG $fptools_cv_htype_long
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned long" >&5
-$as_echo_n "checking Haskell type for unsigned long... " >&6; }
-    if ${fptools_cv_htype_unsigned_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_unsigned_long=yes
-        if ac_fn_c_compute_int "$LINENO" "(unsigned long)0.2 - (unsigned long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-unsigned long val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_unsigned_long="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long=LDouble
-                else
-                    fptools_cv_htype_sup_unsigned_long=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((unsigned long)(-1)) < ((unsigned long)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_unsigned_long="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_unsigned_long="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_unsigned_long" = no
-    then
-
-        fptools_cv_htype_unsigned_long=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_unsigned_long" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_long" >&5
-$as_echo "$fptools_cv_htype_unsigned_long" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UNSIGNED_LONG $fptools_cv_htype_unsigned_long
-_ACEOF
-
-    fi
-
-
-if test "$ac_cv_type_long_long" = yes; then
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for long long" >&5
-$as_echo_n "checking Haskell type for long long... " >&6; }
-    if ${fptools_cv_htype_long_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_long_long=yes
-        if ac_fn_c_compute_int "$LINENO" "(long long)0.2 - (long long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-long long val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_long_long="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long_long=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_long_long=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_long_long=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_long_long=LDouble
-                else
-                    fptools_cv_htype_sup_long_long=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((long long)(-1)) < ((long long)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long_long=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(long long) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_long_long=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_long_long="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_long_long="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_long_long" = no
-    then
-
-        fptools_cv_htype_long_long=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_long_long" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_long_long" >&5
-$as_echo "$fptools_cv_htype_long_long" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_LONG_LONG $fptools_cv_htype_long_long
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned long long" >&5
-$as_echo_n "checking Haskell type for unsigned long long... " >&6; }
-    if ${fptools_cv_htype_unsigned_long_long+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_unsigned_long_long=yes
-        if ac_fn_c_compute_int "$LINENO" "(unsigned long long)0.2 - (unsigned long long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-unsigned long long val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_unsigned_long_long="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long_long=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long_long=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long_long=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long_long=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_unsigned_long_long=LDouble
-                else
-                    fptools_cv_htype_sup_unsigned_long_long=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((unsigned long long)(-1)) < ((unsigned long long)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long_long=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_unsigned_long_long=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_unsigned_long_long="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_unsigned_long_long="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_unsigned_long_long" = no
-    then
-
-        fptools_cv_htype_unsigned_long_long=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_unsigned_long_long" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_long_long" >&5
-$as_echo "$fptools_cv_htype_unsigned_long_long" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UNSIGNED_LONG_LONG $fptools_cv_htype_unsigned_long_long
-_ACEOF
-
-    fi
-
-
-fi
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for bool" >&5
-$as_echo_n "checking Haskell type for bool... " >&6; }
-    if ${fptools_cv_htype_bool+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_bool=yes
-        if ac_fn_c_compute_int "$LINENO" "(bool)0.2 - (bool)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-bool val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_bool="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_bool=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_bool=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_bool=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_bool=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_bool=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_bool=LDouble
-                else
-                    fptools_cv_htype_sup_bool=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((bool)(-1)) < ((bool)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_bool=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(bool) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_bool=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_bool="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_bool="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_bool" = no
-    then
-
-        fptools_cv_htype_bool=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_bool" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_bool" >&5
-$as_echo "$fptools_cv_htype_bool" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_BOOL $fptools_cv_htype_bool
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for float" >&5
-$as_echo_n "checking Haskell type for float... " >&6; }
-    if ${fptools_cv_htype_float+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_float=yes
-        if ac_fn_c_compute_int "$LINENO" "(float)0.2 - (float)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-float val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_float="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_float=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_float=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_float=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_float=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_float=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_float=LDouble
-                else
-                    fptools_cv_htype_sup_float=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((float)(-1)) < ((float)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_float=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(float) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_float=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_float="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_float="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_float" = no
-    then
-
-        fptools_cv_htype_float=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_float" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_float" >&5
-$as_echo "$fptools_cv_htype_float" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_FLOAT $fptools_cv_htype_float
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for double" >&5
-$as_echo_n "checking Haskell type for double... " >&6; }
-    if ${fptools_cv_htype_double+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_double=yes
-        if ac_fn_c_compute_int "$LINENO" "(double)0.2 - (double)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-double val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_double="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_double=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_double=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_double=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_double=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_double=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_double=LDouble
-                else
-                    fptools_cv_htype_sup_double=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((double)(-1)) < ((double)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_double=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(double) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_double=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_double="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_double="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_double" = no
-    then
-
-        fptools_cv_htype_double=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_double" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_double" >&5
-$as_echo "$fptools_cv_htype_double" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_DOUBLE $fptools_cv_htype_double
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ptrdiff_t" >&5
-$as_echo_n "checking Haskell type for ptrdiff_t... " >&6; }
-    if ${fptools_cv_htype_ptrdiff_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_ptrdiff_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(ptrdiff_t)0.2 - (ptrdiff_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-ptrdiff_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_ptrdiff_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ptrdiff_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ptrdiff_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ptrdiff_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_ptrdiff_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ptrdiff_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ptrdiff_t=LDouble
-                else
-                    fptools_cv_htype_sup_ptrdiff_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((ptrdiff_t)(-1)) < ((ptrdiff_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ptrdiff_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ptrdiff_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_ptrdiff_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_ptrdiff_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_ptrdiff_t" = no
-    then
-
-        fptools_cv_htype_ptrdiff_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_ptrdiff_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ptrdiff_t" >&5
-$as_echo "$fptools_cv_htype_ptrdiff_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_PTRDIFF_T $fptools_cv_htype_ptrdiff_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for size_t" >&5
-$as_echo_n "checking Haskell type for size_t... " >&6; }
-    if ${fptools_cv_htype_size_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_size_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(size_t)0.2 - (size_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-size_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_size_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_size_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_size_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_size_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_size_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_size_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_size_t=LDouble
-                else
-                    fptools_cv_htype_sup_size_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((size_t)(-1)) < ((size_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_size_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_size_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_size_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_size_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_size_t" = no
-    then
-
-        fptools_cv_htype_size_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_size_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_size_t" >&5
-$as_echo "$fptools_cv_htype_size_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SIZE_T $fptools_cv_htype_size_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for wchar_t" >&5
-$as_echo_n "checking Haskell type for wchar_t... " >&6; }
-    if ${fptools_cv_htype_wchar_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_wchar_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(wchar_t)0.2 - (wchar_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-wchar_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_wchar_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_wchar_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_wchar_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_wchar_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_wchar_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_wchar_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_wchar_t=LDouble
-                else
-                    fptools_cv_htype_sup_wchar_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((wchar_t)(-1)) < ((wchar_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_wchar_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_wchar_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_wchar_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_wchar_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_wchar_t" = no
-    then
-
-        fptools_cv_htype_wchar_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_wchar_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_wchar_t" >&5
-$as_echo "$fptools_cv_htype_wchar_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_WCHAR_T $fptools_cv_htype_wchar_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for sig_atomic_t" >&5
-$as_echo_n "checking Haskell type for sig_atomic_t... " >&6; }
-    if ${fptools_cv_htype_sig_atomic_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_sig_atomic_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(sig_atomic_t)0.2 - (sig_atomic_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-sig_atomic_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_sig_atomic_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_sig_atomic_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_sig_atomic_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_sig_atomic_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_sig_atomic_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_sig_atomic_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_sig_atomic_t=LDouble
-                else
-                    fptools_cv_htype_sup_sig_atomic_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((sig_atomic_t)(-1)) < ((sig_atomic_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_sig_atomic_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_sig_atomic_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_sig_atomic_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_sig_atomic_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_sig_atomic_t" = no
-    then
-
-        fptools_cv_htype_sig_atomic_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_sig_atomic_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_sig_atomic_t" >&5
-$as_echo "$fptools_cv_htype_sig_atomic_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SIG_ATOMIC_T $fptools_cv_htype_sig_atomic_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for clock_t" >&5
-$as_echo_n "checking Haskell type for clock_t... " >&6; }
-    if ${fptools_cv_htype_clock_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_clock_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(clock_t)0.2 - (clock_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-clock_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_clock_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clock_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clock_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clock_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_clock_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_clock_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_clock_t=LDouble
-                else
-                    fptools_cv_htype_sup_clock_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((clock_t)(-1)) < ((clock_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clock_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clock_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_clock_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_clock_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_clock_t" = no
-    then
-
-        fptools_cv_htype_clock_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_clock_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_clock_t" >&5
-$as_echo "$fptools_cv_htype_clock_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_CLOCK_T $fptools_cv_htype_clock_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for time_t" >&5
-$as_echo_n "checking Haskell type for time_t... " >&6; }
-    if ${fptools_cv_htype_time_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_time_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(time_t)0.2 - (time_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-time_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_time_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_time_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_time_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_time_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_time_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_time_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_time_t=LDouble
-                else
-                    fptools_cv_htype_sup_time_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((time_t)(-1)) < ((time_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_time_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_time_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_time_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_time_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_time_t" = no
-    then
-
-        fptools_cv_htype_time_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_time_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_time_t" >&5
-$as_echo "$fptools_cv_htype_time_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_TIME_T $fptools_cv_htype_time_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for useconds_t" >&5
-$as_echo_n "checking Haskell type for useconds_t... " >&6; }
-    if ${fptools_cv_htype_useconds_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_useconds_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(useconds_t)0.2 - (useconds_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-useconds_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_useconds_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_useconds_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_useconds_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_useconds_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_useconds_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_useconds_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_useconds_t=LDouble
-                else
-                    fptools_cv_htype_sup_useconds_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((useconds_t)(-1)) < ((useconds_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_useconds_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_useconds_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_useconds_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_useconds_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_useconds_t" = no
-    then
-
-        fptools_cv_htype_useconds_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_useconds_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_useconds_t" >&5
-$as_echo "$fptools_cv_htype_useconds_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_USECONDS_T $fptools_cv_htype_useconds_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for suseconds_t" >&5
-$as_echo_n "checking Haskell type for suseconds_t... " >&6; }
-    if ${fptools_cv_htype_suseconds_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_suseconds_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(suseconds_t)0.2 - (suseconds_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-suseconds_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_suseconds_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_suseconds_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_suseconds_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_suseconds_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_suseconds_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_suseconds_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_suseconds_t=LDouble
-                else
-                    fptools_cv_htype_sup_suseconds_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((suseconds_t)(-1)) < ((suseconds_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_suseconds_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_suseconds_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_suseconds_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_suseconds_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_suseconds_t" = no
-    then
-        if test "$WINDOWS" = "YES"
-                          then
-                              fptools_cv_htype_suseconds_t=Int32
-                              fptools_cv_htype_sup_suseconds_t=yes
-                          else
-                              as_fn_error $? "type not found" "$LINENO" 5
-                          fi
-    fi
-
-            if test "$fptools_cv_htype_sup_suseconds_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_suseconds_t" >&5
-$as_echo "$fptools_cv_htype_suseconds_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SUSECONDS_T $fptools_cv_htype_suseconds_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for dev_t" >&5
-$as_echo_n "checking Haskell type for dev_t... " >&6; }
-    if ${fptools_cv_htype_dev_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_dev_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(dev_t)0.2 - (dev_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-dev_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_dev_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_dev_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_dev_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_dev_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_dev_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_dev_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_dev_t=LDouble
-                else
-                    fptools_cv_htype_sup_dev_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((dev_t)(-1)) < ((dev_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_dev_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_dev_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_dev_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_dev_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_dev_t" = no
-    then
-
-        fptools_cv_htype_dev_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_dev_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_dev_t" >&5
-$as_echo "$fptools_cv_htype_dev_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_DEV_T $fptools_cv_htype_dev_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ino_t" >&5
-$as_echo_n "checking Haskell type for ino_t... " >&6; }
-    if ${fptools_cv_htype_ino_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_ino_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(ino_t)0.2 - (ino_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-ino_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_ino_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ino_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ino_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ino_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_ino_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ino_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ino_t=LDouble
-                else
-                    fptools_cv_htype_sup_ino_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((ino_t)(-1)) < ((ino_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ino_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ino_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_ino_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_ino_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_ino_t" = no
-    then
-
-        fptools_cv_htype_ino_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_ino_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ino_t" >&5
-$as_echo "$fptools_cv_htype_ino_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_INO_T $fptools_cv_htype_ino_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for mode_t" >&5
-$as_echo_n "checking Haskell type for mode_t... " >&6; }
-    if ${fptools_cv_htype_mode_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_mode_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(mode_t)0.2 - (mode_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-mode_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_mode_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_mode_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_mode_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_mode_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_mode_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_mode_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_mode_t=LDouble
-                else
-                    fptools_cv_htype_sup_mode_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((mode_t)(-1)) < ((mode_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_mode_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_mode_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_mode_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_mode_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_mode_t" = no
-    then
-
-        fptools_cv_htype_mode_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_mode_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_mode_t" >&5
-$as_echo "$fptools_cv_htype_mode_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_MODE_T $fptools_cv_htype_mode_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for off_t" >&5
-$as_echo_n "checking Haskell type for off_t... " >&6; }
-    if ${fptools_cv_htype_off_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_off_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(off_t)0.2 - (off_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-off_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_off_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_off_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_off_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_off_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_off_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_off_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_off_t=LDouble
-                else
-                    fptools_cv_htype_sup_off_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((off_t)(-1)) < ((off_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_off_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_off_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_off_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_off_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_off_t" = no
-    then
-
-        fptools_cv_htype_off_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_off_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_off_t" >&5
-$as_echo "$fptools_cv_htype_off_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_OFF_T $fptools_cv_htype_off_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for pid_t" >&5
-$as_echo_n "checking Haskell type for pid_t... " >&6; }
-    if ${fptools_cv_htype_pid_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_pid_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(pid_t)0.2 - (pid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-pid_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_pid_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_pid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_pid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_pid_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_pid_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_pid_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_pid_t=LDouble
-                else
-                    fptools_cv_htype_sup_pid_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((pid_t)(-1)) < ((pid_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_pid_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_pid_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_pid_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_pid_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_pid_t" = no
-    then
-
-        fptools_cv_htype_pid_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_pid_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_pid_t" >&5
-$as_echo "$fptools_cv_htype_pid_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_PID_T $fptools_cv_htype_pid_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for gid_t" >&5
-$as_echo_n "checking Haskell type for gid_t... " >&6; }
-    if ${fptools_cv_htype_gid_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_gid_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(gid_t)0.2 - (gid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-gid_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_gid_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_gid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_gid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_gid_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_gid_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_gid_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_gid_t=LDouble
-                else
-                    fptools_cv_htype_sup_gid_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((gid_t)(-1)) < ((gid_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_gid_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_gid_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_gid_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_gid_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_gid_t" = no
-    then
-
-        fptools_cv_htype_gid_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_gid_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_gid_t" >&5
-$as_echo "$fptools_cv_htype_gid_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_GID_T $fptools_cv_htype_gid_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uid_t" >&5
-$as_echo_n "checking Haskell type for uid_t... " >&6; }
-    if ${fptools_cv_htype_uid_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_uid_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(uid_t)0.2 - (uid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-uid_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_uid_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uid_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_uid_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uid_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uid_t=LDouble
-                else
-                    fptools_cv_htype_sup_uid_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((uid_t)(-1)) < ((uid_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uid_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uid_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_uid_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_uid_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_uid_t" = no
-    then
-
-        fptools_cv_htype_uid_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_uid_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uid_t" >&5
-$as_echo "$fptools_cv_htype_uid_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UID_T $fptools_cv_htype_uid_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for cc_t" >&5
-$as_echo_n "checking Haskell type for cc_t... " >&6; }
-    if ${fptools_cv_htype_cc_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_cc_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(cc_t)0.2 - (cc_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-cc_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_cc_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_cc_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_cc_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_cc_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_cc_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_cc_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_cc_t=LDouble
-                else
-                    fptools_cv_htype_sup_cc_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((cc_t)(-1)) < ((cc_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_cc_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_cc_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_cc_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_cc_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_cc_t" = no
-    then
-
-        fptools_cv_htype_cc_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_cc_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_cc_t" >&5
-$as_echo "$fptools_cv_htype_cc_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_CC_T $fptools_cv_htype_cc_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for speed_t" >&5
-$as_echo_n "checking Haskell type for speed_t... " >&6; }
-    if ${fptools_cv_htype_speed_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_speed_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(speed_t)0.2 - (speed_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-speed_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_speed_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_speed_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_speed_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_speed_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_speed_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_speed_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_speed_t=LDouble
-                else
-                    fptools_cv_htype_sup_speed_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((speed_t)(-1)) < ((speed_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_speed_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_speed_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_speed_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_speed_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_speed_t" = no
-    then
-
-        fptools_cv_htype_speed_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_speed_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_speed_t" >&5
-$as_echo "$fptools_cv_htype_speed_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SPEED_T $fptools_cv_htype_speed_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for tcflag_t" >&5
-$as_echo_n "checking Haskell type for tcflag_t... " >&6; }
-    if ${fptools_cv_htype_tcflag_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_tcflag_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(tcflag_t)0.2 - (tcflag_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-tcflag_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_tcflag_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_tcflag_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_tcflag_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_tcflag_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_tcflag_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_tcflag_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_tcflag_t=LDouble
-                else
-                    fptools_cv_htype_sup_tcflag_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((tcflag_t)(-1)) < ((tcflag_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_tcflag_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_tcflag_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_tcflag_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_tcflag_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_tcflag_t" = no
-    then
-
-        fptools_cv_htype_tcflag_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_tcflag_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_tcflag_t" >&5
-$as_echo "$fptools_cv_htype_tcflag_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_TCFLAG_T $fptools_cv_htype_tcflag_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for nlink_t" >&5
-$as_echo_n "checking Haskell type for nlink_t... " >&6; }
-    if ${fptools_cv_htype_nlink_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_nlink_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(nlink_t)0.2 - (nlink_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-nlink_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_nlink_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_nlink_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_nlink_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_nlink_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_nlink_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_nlink_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_nlink_t=LDouble
-                else
-                    fptools_cv_htype_sup_nlink_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((nlink_t)(-1)) < ((nlink_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_nlink_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_nlink_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_nlink_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_nlink_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_nlink_t" = no
-    then
-
-        fptools_cv_htype_nlink_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_nlink_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_nlink_t" >&5
-$as_echo "$fptools_cv_htype_nlink_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_NLINK_T $fptools_cv_htype_nlink_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ssize_t" >&5
-$as_echo_n "checking Haskell type for ssize_t... " >&6; }
-    if ${fptools_cv_htype_ssize_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_ssize_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(ssize_t)0.2 - (ssize_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-ssize_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_ssize_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ssize_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ssize_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ssize_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_ssize_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ssize_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_ssize_t=LDouble
-                else
-                    fptools_cv_htype_sup_ssize_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((ssize_t)(-1)) < ((ssize_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ssize_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_ssize_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_ssize_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_ssize_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_ssize_t" = no
-    then
-
-        fptools_cv_htype_ssize_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_ssize_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ssize_t" >&5
-$as_echo "$fptools_cv_htype_ssize_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_SSIZE_T $fptools_cv_htype_ssize_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for rlim_t" >&5
-$as_echo_n "checking Haskell type for rlim_t... " >&6; }
-    if ${fptools_cv_htype_rlim_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_rlim_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(rlim_t)0.2 - (rlim_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-rlim_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_rlim_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_rlim_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_rlim_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_rlim_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_rlim_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_rlim_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_rlim_t=LDouble
-                else
-                    fptools_cv_htype_sup_rlim_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((rlim_t)(-1)) < ((rlim_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_rlim_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_rlim_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_rlim_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_rlim_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_rlim_t" = no
-    then
-
-        fptools_cv_htype_rlim_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_rlim_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_rlim_t" >&5
-$as_echo "$fptools_cv_htype_rlim_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_RLIM_T $fptools_cv_htype_rlim_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for blksize_t" >&5
-$as_echo_n "checking Haskell type for blksize_t... " >&6; }
-    if ${fptools_cv_htype_blksize_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_blksize_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(blksize_t)0.2 - (blksize_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-blksize_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_blksize_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blksize_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blksize_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blksize_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_blksize_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_blksize_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_blksize_t=LDouble
-                else
-                    fptools_cv_htype_sup_blksize_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((blksize_t)(-1)) < ((blksize_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blksize_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blksize_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_blksize_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_blksize_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_blksize_t" = no
-    then
-
-        fptools_cv_htype_blksize_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_blksize_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_blksize_t" >&5
-$as_echo "$fptools_cv_htype_blksize_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_BLKSIZE_T $fptools_cv_htype_blksize_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for blkcnt_t" >&5
-$as_echo_n "checking Haskell type for blkcnt_t... " >&6; }
-    if ${fptools_cv_htype_blkcnt_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_blkcnt_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(blkcnt_t)0.2 - (blkcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-blkcnt_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_blkcnt_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blkcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blkcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blkcnt_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_blkcnt_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_blkcnt_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_blkcnt_t=LDouble
-                else
-                    fptools_cv_htype_sup_blkcnt_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((blkcnt_t)(-1)) < ((blkcnt_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blkcnt_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_blkcnt_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_blkcnt_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_blkcnt_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_blkcnt_t" = no
-    then
-
-        fptools_cv_htype_blkcnt_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_blkcnt_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_blkcnt_t" >&5
-$as_echo "$fptools_cv_htype_blkcnt_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_BLKCNT_T $fptools_cv_htype_blkcnt_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for clockid_t" >&5
-$as_echo_n "checking Haskell type for clockid_t... " >&6; }
-    if ${fptools_cv_htype_clockid_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_clockid_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(clockid_t)0.2 - (clockid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-clockid_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_clockid_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clockid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clockid_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clockid_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_clockid_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_clockid_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_clockid_t=LDouble
-                else
-                    fptools_cv_htype_sup_clockid_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((clockid_t)(-1)) < ((clockid_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clockid_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_clockid_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_clockid_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_clockid_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_clockid_t" = no
-    then
-
-        fptools_cv_htype_clockid_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_clockid_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_clockid_t" >&5
-$as_echo "$fptools_cv_htype_clockid_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_CLOCKID_T $fptools_cv_htype_clockid_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for fsblkcnt_t" >&5
-$as_echo_n "checking Haskell type for fsblkcnt_t... " >&6; }
-    if ${fptools_cv_htype_fsblkcnt_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_fsblkcnt_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(fsblkcnt_t)0.2 - (fsblkcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-fsblkcnt_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_fsblkcnt_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsblkcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsblkcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsblkcnt_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_fsblkcnt_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_fsblkcnt_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_fsblkcnt_t=LDouble
-                else
-                    fptools_cv_htype_sup_fsblkcnt_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((fsblkcnt_t)(-1)) < ((fsblkcnt_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsblkcnt_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsblkcnt_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_fsblkcnt_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_fsblkcnt_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_fsblkcnt_t" = no
-    then
-
-        fptools_cv_htype_fsblkcnt_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_fsblkcnt_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_fsblkcnt_t" >&5
-$as_echo "$fptools_cv_htype_fsblkcnt_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_FSBLKCNT_T $fptools_cv_htype_fsblkcnt_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for fsfilcnt_t" >&5
-$as_echo_n "checking Haskell type for fsfilcnt_t... " >&6; }
-    if ${fptools_cv_htype_fsfilcnt_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_fsfilcnt_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(fsfilcnt_t)0.2 - (fsfilcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-fsfilcnt_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_fsfilcnt_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsfilcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsfilcnt_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsfilcnt_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_fsfilcnt_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_fsfilcnt_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_fsfilcnt_t=LDouble
-                else
-                    fptools_cv_htype_sup_fsfilcnt_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((fsfilcnt_t)(-1)) < ((fsfilcnt_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsfilcnt_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_fsfilcnt_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_fsfilcnt_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_fsfilcnt_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_fsfilcnt_t" = no
-    then
-
-        fptools_cv_htype_fsfilcnt_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_fsfilcnt_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_fsfilcnt_t" >&5
-$as_echo "$fptools_cv_htype_fsfilcnt_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_FSFILCNT_T $fptools_cv_htype_fsfilcnt_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for id_t" >&5
-$as_echo_n "checking Haskell type for id_t... " >&6; }
-    if ${fptools_cv_htype_id_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_id_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(id_t)0.2 - (id_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-id_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_id_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_id_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_id_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_id_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_id_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_id_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_id_t=LDouble
-                else
-                    fptools_cv_htype_sup_id_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((id_t)(-1)) < ((id_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_id_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_id_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_id_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_id_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_id_t" = no
-    then
-
-        fptools_cv_htype_id_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_id_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_id_t" >&5
-$as_echo "$fptools_cv_htype_id_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_ID_T $fptools_cv_htype_id_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for key_t" >&5
-$as_echo_n "checking Haskell type for key_t... " >&6; }
-    if ${fptools_cv_htype_key_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_key_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(key_t)0.2 - (key_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-key_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_key_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_key_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_key_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_key_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_key_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_key_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_key_t=LDouble
-                else
-                    fptools_cv_htype_sup_key_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((key_t)(-1)) < ((key_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_key_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_key_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_key_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_key_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_key_t" = no
-    then
-
-        fptools_cv_htype_key_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_key_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_key_t" >&5
-$as_echo "$fptools_cv_htype_key_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_KEY_T $fptools_cv_htype_key_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for timer_t" >&5
-$as_echo_n "checking Haskell type for timer_t... " >&6; }
-    if ${fptools_cv_htype_timer_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_timer_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(timer_t)0.2 - (timer_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-timer_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_timer_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_timer_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_timer_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_timer_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_timer_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_timer_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_timer_t=LDouble
-                else
-                    fptools_cv_htype_sup_timer_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((timer_t)(-1)) < ((timer_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_timer_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_timer_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_timer_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_timer_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_timer_t" = no
-    then
-
-        fptools_cv_htype_timer_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_timer_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_timer_t" >&5
-$as_echo "$fptools_cv_htype_timer_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_TIMER_T $fptools_cv_htype_timer_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for intptr_t" >&5
-$as_echo_n "checking Haskell type for intptr_t... " >&6; }
-    if ${fptools_cv_htype_intptr_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_intptr_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(intptr_t)0.2 - (intptr_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-intptr_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_intptr_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intptr_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intptr_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intptr_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_intptr_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_intptr_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_intptr_t=LDouble
-                else
-                    fptools_cv_htype_sup_intptr_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((intptr_t)(-1)) < ((intptr_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intptr_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intptr_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_intptr_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_intptr_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_intptr_t" = no
-    then
-
-        fptools_cv_htype_intptr_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_intptr_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_intptr_t" >&5
-$as_echo "$fptools_cv_htype_intptr_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_INTPTR_T $fptools_cv_htype_intptr_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uintptr_t" >&5
-$as_echo_n "checking Haskell type for uintptr_t... " >&6; }
-    if ${fptools_cv_htype_uintptr_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_uintptr_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(uintptr_t)0.2 - (uintptr_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-uintptr_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_uintptr_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintptr_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintptr_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintptr_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_uintptr_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uintptr_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uintptr_t=LDouble
-                else
-                    fptools_cv_htype_sup_uintptr_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((uintptr_t)(-1)) < ((uintptr_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintptr_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintptr_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_uintptr_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_uintptr_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_uintptr_t" = no
-    then
-
-        fptools_cv_htype_uintptr_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_uintptr_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uintptr_t" >&5
-$as_echo "$fptools_cv_htype_uintptr_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UINTPTR_T $fptools_cv_htype_uintptr_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for intmax_t" >&5
-$as_echo_n "checking Haskell type for intmax_t... " >&6; }
-    if ${fptools_cv_htype_intmax_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_intmax_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(intmax_t)0.2 - (intmax_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-intmax_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_intmax_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intmax_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intmax_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intmax_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_intmax_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_intmax_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_intmax_t=LDouble
-                else
-                    fptools_cv_htype_sup_intmax_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((intmax_t)(-1)) < ((intmax_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intmax_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_intmax_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_intmax_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_intmax_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_intmax_t" = no
-    then
-
-        fptools_cv_htype_intmax_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_intmax_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_intmax_t" >&5
-$as_echo "$fptools_cv_htype_intmax_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_INTMAX_T $fptools_cv_htype_intmax_t
-_ACEOF
-
-    fi
-
-
-
-
-
-
-
-
-
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uintmax_t" >&5
-$as_echo_n "checking Haskell type for uintmax_t... " >&6; }
-    if ${fptools_cv_htype_uintmax_t+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-
-        fptools_cv_htype_sup_uintmax_t=yes
-        if ac_fn_c_compute_int "$LINENO" "(uintmax_t)0.2 - (uintmax_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  HTYPE_IS_INTEGRAL=0
-fi
-
-
-
-        if test "$HTYPE_IS_INTEGRAL" -eq 0
-        then
-                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-
-int
-main ()
-{
-uintmax_t val; *val;
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-  HTYPE_IS_POINTER=yes
-else
-  HTYPE_IS_POINTER=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
-            if test "$HTYPE_IS_POINTER" = yes
-            then
-                fptools_cv_htype_uintmax_t="Ptr ()"
-            else
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintmax_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintmax_t=no
-fi
-
-
-                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintmax_t=no
-fi
-
-
-                if test "$HTYPE_IS_FLOAT" -eq 1
-                then
-                    fptools_cv_htype_uintmax_t=Float
-                elif test "$HTYPE_IS_DOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uintmax_t=Double
-                elif test "$HTYPE_IS_LDOUBLE" -eq 1
-                then
-                    fptools_cv_htype_uintmax_t=LDouble
-                else
-                    fptools_cv_htype_sup_uintmax_t=no
-                fi
-            fi
-        else
-            if ac_fn_c_compute_int "$LINENO" "((uintmax_t)(-1)) < ((uintmax_t)0)" "HTYPE_IS_SIGNED"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintmax_t=no
-fi
-
-
-            if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) * 8" "HTYPE_SIZE"        "
-#include <stdbool.h>
-#include <stdio.h>
-#include <stddef.h>
-
-#if HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-#if HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
-
-#if HAVE_FCNTL_H
-# include <fcntl.h>
-#endif
-
-#if HAVE_SIGNAL_H
-# include <signal.h>
-#endif
-
-#if HAVE_TIME_H
-# include <time.h>
-#endif
-
-#if HAVE_TERMIOS_H
-# include <termios.h>
-#endif
-
-#if HAVE_STRING_H
-# include <string.h>
-#endif
-
-#if HAVE_CTYPE_H
-# include <ctype.h>
-#endif
-
-#if HAVE_INTTYPES_H
-# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-#  include <stdint.h>
-# endif
-#endif
-
-#if HAVE_SYS_RESOURCE_H
-# include <sys/resource.h>
-#endif
-
-#include <stdlib.h>
-"; then :
-
-else
-  fptools_cv_htype_sup_uintmax_t=no
-fi
-
-
-            if test "$HTYPE_IS_SIGNED" -eq 0
-            then
-                fptools_cv_htype_uintmax_t="Word$HTYPE_SIZE"
-            else
-                fptools_cv_htype_uintmax_t="Int$HTYPE_SIZE"
-            fi
-        fi
-
-fi
-
-    if test "$fptools_cv_htype_sup_uintmax_t" = no
-    then
-
-        fptools_cv_htype_uintmax_t=NotReallyAType
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
-$as_echo "not supported" >&6; }
-
-    fi
-
-            if test "$fptools_cv_htype_sup_uintmax_t" = yes; then
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uintmax_t" >&5
-$as_echo "$fptools_cv_htype_uintmax_t" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define HTYPE_UINTMAX_T $fptools_cv_htype_uintmax_t
-_ACEOF
-
-    fi
-
-
-
-# test errno values
-for fp_const_name in E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EADV EAFNOSUPPORT EAGAIN EALREADY EBADF EBADMSG EBADRPC EBUSY ECHILD ECOMM ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDIRTY EDOM EDQUOT EEXIST EFAULT EFBIG EFTYPE EHOSTDOWN EHOSTUNREACH EIDRM EILSEQ EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENONET ENOPROTOOPT ENOSPC ENOSR ENOSTR ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE EPROCLIM EPROCUNAVAIL EPROGMISMATCH EPROGUNAVAIL EPROTO EPROTONOSUPPORT EPROTOTYPE ERANGE EREMCHG EREMOTE EROFS ERPCMISMATCH ERREMOTE ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESRMNT ESTALE ETIME ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV ENOCIGAR ENOTSUP
-do
-as_fp_Cache=`$as_echo "fp_cv_const_$fp_const_name" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of $fp_const_name" >&5
-$as_echo_n "checking value of $fp_const_name... " >&6; }
-if eval \${$as_fp_Cache+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "$fp_const_name" "fp_check_const_result"        "#include <stdio.h>
-#include <errno.h>
-"; then :
-
-else
-  fp_check_const_result='-1'
-fi
-
-
-eval "$as_fp_Cache=\$fp_check_const_result"
-fi
-eval ac_res=\$$as_fp_Cache
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "CONST_$fp_const_name" | $as_tr_cpp` `eval 'as_val=${'$as_fp_Cache'};$as_echo "$as_val"'`
-_ACEOF
-
-done
-
-
-# we need SIGINT in TopHandler.lhs
-for fp_const_name in SIGINT
-do
-as_fp_Cache=`$as_echo "fp_cv_const_$fp_const_name" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of $fp_const_name" >&5
-$as_echo_n "checking value of $fp_const_name... " >&6; }
-if eval \${$as_fp_Cache+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "$fp_const_name" "fp_check_const_result"        "
-#if HAVE_SIGNAL_H
-#include <signal.h>
-#endif
-"; then :
-
-else
-  fp_check_const_result='-1'
-fi
-
-
-eval "$as_fp_Cache=\$fp_check_const_result"
-fi
-eval ac_res=\$$as_fp_Cache
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define `$as_echo "CONST_$fp_const_name" | $as_tr_cpp` `eval 'as_val=${'$as_fp_Cache'};$as_echo "$as_val"'`
-_ACEOF
-
-done
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of O_BINARY" >&5
-$as_echo_n "checking value of O_BINARY... " >&6; }
-if ${fp_cv_const_O_BINARY+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  if ac_fn_c_compute_int "$LINENO" "O_BINARY" "fp_check_const_result"        "#include <fcntl.h>
-"; then :
-
-else
-  fp_check_const_result=0
-fi
-
-
-fp_cv_const_O_BINARY=$fp_check_const_result
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fp_cv_const_O_BINARY" >&5
-$as_echo "$fp_cv_const_O_BINARY" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define CONST_O_BINARY $fp_cv_const_O_BINARY
-_ACEOF
-
-
-# We don't use iconv or libcharset on Windows, but if configure finds
-# them then it can cause problems. So we don't even try looking if
-# we are on Windows.
-# See http://www.haskell.org/pipermail/cvs-ghc/2011-September/065980.html
-if test "$WINDOWS" = "NO"
-then
-
-# We can't just use AC_SEARCH_LIBS for this, as on OpenBSD the iconv.h
-# header needs to be included as iconv_open is #define'd to something
-# else. We therefore use our own FP_SEARCH_LIBS_PROTO, which allows us
-# to give prototype text.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5
-$as_echo_n "checking for library containing iconv... " >&6; }
-if ${ac_cv_search_iconv+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-#include <stddef.h>
-#include <iconv.h>
-
-int
-main ()
-{
-iconv_t cd;
-                      cd = iconv_open("", "");
-                      iconv(cd,NULL,NULL,NULL,NULL);
-                      iconv_close(cd);
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' iconv; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_iconv=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_iconv+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_iconv+:} false; then :
-
-else
-  ac_cv_search_iconv=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5
-$as_echo "$ac_cv_search_iconv" >&6; }
-ac_res=$ac_cv_search_iconv
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-  EXTRA_LIBS="$EXTRA_LIBS $ac_lib"
-else
-  as_fn_error $? "iconv is required on non-Windows platforms" "$LINENO" 5
-fi
-
-# If possible, we use libcharset instead of nl_langinfo(CODESET) to
-# determine the current locale's character encoding.  Allow the user
-# to disable this with --without-libcharset if they don't want a
-# dependency on libcharset.
-
-# Check whether --with-libcharset was given.
-if test "${with_libcharset+set}" = set; then :
-  withval=$with_libcharset;
-else
-  with_libcharset=check
-fi
-
-
-if test "x$with_libcharset" != xno; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing locale_charset" >&5
-$as_echo_n "checking for library containing locale_charset... " >&6; }
-if ${ac_cv_search_locale_charset+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_func_search_save_LIBS=$LIBS
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <libcharset.h>
-int
-main ()
-{
-const char* charset = locale_charset();
-  ;
-  return 0;
-}
-_ACEOF
-for ac_lib in '' charset; do
-  if test -z "$ac_lib"; then
-    ac_res="none required"
-  else
-    ac_res=-l$ac_lib
-    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
-  fi
-  if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_search_locale_charset=$ac_res
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext
-  if ${ac_cv_search_locale_charset+:} false; then :
-  break
-fi
-done
-if ${ac_cv_search_locale_charset+:} false; then :
-
-else
-  ac_cv_search_locale_charset=no
-fi
-rm conftest.$ac_ext
-LIBS=$ac_func_search_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_locale_charset" >&5
-$as_echo "$ac_cv_search_locale_charset" >&6; }
-ac_res=$ac_cv_search_locale_charset
-if test "$ac_res" != no; then :
-  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
-
-$as_echo "#define HAVE_LIBCHARSET 1" >>confdefs.h
-
-     EXTRA_LIBS="$EXTRA_LIBS $ac_lib"
-
-fi
-fi
-
-fi
-
-# Hack - md5.h needs HsFFI.h.  Is there a better way to do this?
-CFLAGS="-I../.. -I../../../../includes $CFLAGS"
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_largefile
+with_iconv_includes
+with_iconv_libraries
+with_libcharset
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures Haskell base package 1.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/base]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+  --target=TARGET   configure for building compilers for TARGET [HOST]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of Haskell base package 1.0:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --disable-largefile     omit support for large files
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --with-iconv-includes   directory containing iconv.h
+  --with-iconv-libraries  directory containing iconv library
+  --with-libcharset       Use libcharset [default=only if available]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <libraries@haskell.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+Haskell base package configure 1.0
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if eval \${$3+:} false; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ------------------------------------ ##
+## Report this to libraries@haskell.org ##
+## ------------------------------------ ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # interfere with the next link command; also delete a directory that is
+  # left behind by Apple's compiler.  We do this before executing the actions.
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if test "$cross_compiling" = yes; then
+    # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid; break
+else
+  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+			if test $ac_lo -le $ac_mid; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_lo=$ac_mid; break
+else
+  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+			if test $ac_mid -le $ac_hi; then
+			  ac_lo= ac_hi=
+			  break
+			fi
+			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0;
+return test_array [0];
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_hi=$ac_mid
+else
+  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+  else
+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    return 1;
+  if (($2) < 0)
+    {
+      long int i = longval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%ld", i);
+    }
+  else
+    {
+      unsigned long int i = ulongval ();
+      if (i != ($2))
+	return 1;
+      fprintf (f, "%lu", i);
+    }
+  /* Do not output a trailing newline, as this causes \r\n confusion
+     on some platforms.  */
+  return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+  ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+  fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  as_decl_name=`echo $2|sed 's/ *(.*//'`
+  as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+  (void) $as_decl_use;
+#else
+  (void) $as_decl_name;
+#endif
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_decl
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by Haskell base package $as_me 1.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+# Safety check: Ensure that we are in the correct source directory.
+
+
+ac_config_headers="$ac_config_headers include/HsBaseConfig.h include/EventConfig.h"
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if ${ac_cv_build+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if ${ac_cv_host+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$host_alias" = x; then
+  ac_cv_host=$ac_cv_build
+else
+  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
+$as_echo_n "checking target system type... " >&6; }
+if ${ac_cv_target+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "x$target_alias" = x; then
+  ac_cv_target=$ac_cv_host
+else
+  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
+    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
+$as_echo "$ac_cv_target" >&6; }
+case $ac_cv_target in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
+esac
+target=$ac_cv_target
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_target
+shift
+target_cpu=$1
+target_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+target_os=$*
+IFS=$ac_save_IFS
+case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
+
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+test -n "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+  ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = xyes; then :
+  MINIX=yes
+else
+  MINIX=
+fi
+
+
+  if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+  fi
+
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if ${ac_cv_safe_to_define___extensions__+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#         define __EXTENSIONS__ 1
+          $ac_includes_default
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_safe_to_define___extensions__=yes
+else
+  ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+  test $ac_cv_safe_to_define___extensions__ = yes &&
+    $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+  $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+  $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+  $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WINDOWS platform" >&5
+$as_echo_n "checking for WINDOWS platform... " >&6; }
+case $host in
+    *mingw32*|*mingw64*|*cygwin*|*msys*)
+        WINDOWS=YES;;
+    *)
+        WINDOWS=NO;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDOWS" >&5
+$as_echo "$WINDOWS" >&6; }
+
+# do we have long longs?
+ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
+if test "x$ac_cv_type_long_long" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+
+# check for specific header (.h) files that we are interested in
+for ac_header in ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.h sys/resource.h sys/select.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/wait.h termios.h time.h unistd.h utime.h windows.h winsock.h langinfo.h poll.h sys/epoll.h sys/event.h sys/eventfd.h sys/socket.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Enable large file support. Do this before testing the types ino_t, off_t, and
+# rlim_t, because it will affect the result of that test.
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+  enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if ${ac_cv_sys_largefile_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_sys_largefile_CC=no
+     if test "$GCC" != yes; then
+       ac_save_CC=$CC
+       while :; do
+	 # IRIX 6.2 and later do not support large files by default,
+	 # so use the C compiler's -n32 option if that helps.
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+	 if ac_fn_c_try_compile "$LINENO"; then :
+  break
+fi
+rm -f core conftest.err conftest.$ac_objext
+	 CC="$CC -n32"
+	 if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+	 break
+       done
+       CC=$ac_save_CC
+       rm -f conftest.$ac_ext
+    fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+  if test "$ac_cv_sys_largefile_CC" != no; then
+    CC=$CC$ac_cv_sys_largefile_CC
+  fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if ${ac_cv_sys_file_offset_bits+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_file_offset_bits=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  if test $ac_cv_sys_file_offset_bits = unknown; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if ${ac_cv_sys_large_files+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  while :; do
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+    We can't simply define LARGE_OFF_T to be 9223372036854775807,
+    since some C++ compilers masquerading as C compilers
+    incorrectly reject 9223372036854775807.  */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+		       && LARGE_OFF_T % 2147483647 == 1)
+		      ? 1 : -1];
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+  ac_cv_sys_large_files=unknown
+  break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+  no | unknown) ;;
+  *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+  fi
+
+
+fi
+
+
+for ac_header in wctype.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default"
+if test "x$ac_cv_header_wctype_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_WCTYPE_H 1
+_ACEOF
+ for ac_func in iswspace
+do :
+  ac_fn_c_check_func "$LINENO" "iswspace" "ac_cv_func_iswspace"
+if test "x$ac_cv_func_iswspace" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_ISWSPACE 1
+_ACEOF
+
+fi
+done
+
+fi
+
+done
+
+
+for ac_func in lstat
+do :
+  ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat"
+if test "x$ac_cv_func_lstat" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LSTAT 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" >&5
+$as_echo_n "checking for clock_gettime in -lrt... " >&6; }
+if ${ac_cv_lib_rt_clock_gettime+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lrt  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char clock_gettime ();
+int
+main ()
+{
+return clock_gettime ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_rt_clock_gettime=yes
+else
+  ac_cv_lib_rt_clock_gettime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_clock_gettime" >&5
+$as_echo "$ac_cv_lib_rt_clock_gettime" >&6; }
+if test "x$ac_cv_lib_rt_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBRT 1
+_ACEOF
+
+  LIBS="-lrt $LIBS"
+
+fi
+
+for ac_func in clock_gettime
+do :
+  ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime"
+if test "x$ac_cv_func_clock_gettime" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_CLOCK_GETTIME 1
+_ACEOF
+
+fi
+done
+
+for ac_func in getclock getrusage times
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+for ac_func in _chsize ftruncate
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in epoll_ctl eventfd kevent kevent64 kqueue poll
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+# event-related fun
+
+if test "$ac_cv_header_sys_epoll_h" = yes && test "$ac_cv_func_epoll_ctl" = yes; then
+
+$as_echo "#define HAVE_EPOLL 1" >>confdefs.h
+
+fi
+
+if test "$ac_cv_header_sys_event_h" = yes && test "$ac_cv_func_kqueue" = yes; then
+
+$as_echo "#define HAVE_KQUEUE 1" >>confdefs.h
+
+
+  # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of kev.filter" >&5
+$as_echo_n "checking size of kev.filter... " >&6; }
+if ${ac_cv_sizeof_kev_filter+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (kev.filter))" "ac_cv_sizeof_kev_filter"        "#include <sys/event.h>
+struct kevent kev;
+"; then :
+
+else
+  if test "$ac_cv_type_kev_filter" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (kev.filter)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_kev_filter=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_kev_filter" >&5
+$as_echo "$ac_cv_sizeof_kev_filter" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_KEV_FILTER $ac_cv_sizeof_kev_filter
+_ACEOF
+
+
+
+  # The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of kev.flags" >&5
+$as_echo_n "checking size of kev.flags... " >&6; }
+if ${ac_cv_sizeof_kev_flags+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (kev.flags))" "ac_cv_sizeof_kev_flags"        "#include <sys/event.h>
+struct kevent kev;
+"; then :
+
+else
+  if test "$ac_cv_type_kev_flags" = yes; then
+     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (kev.flags)
+See \`config.log' for more details" "$LINENO" 5; }
+   else
+     ac_cv_sizeof_kev_flags=0
+   fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_kev_flags" >&5
+$as_echo "$ac_cv_sizeof_kev_flags" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_KEV_FLAGS $ac_cv_sizeof_kev_flags
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_header_poll_h" = yes && test "$ac_cv_func_poll" = yes; then
+
+$as_echo "#define HAVE_POLL 1" >>confdefs.h
+
+fi
+
+# Linux open file descriptor locks
+ac_fn_c_check_decl "$LINENO" "F_OFD_SETLK" "ac_cv_have_decl_F_OFD_SETLK" "
+  #include <unistd.h>
+  #include <fcntl.h>
+
+"
+if test "x$ac_cv_have_decl_F_OFD_SETLK" = xyes; then :
+
+
+$as_echo "#define HAVE_OFD_LOCKING 1" >>confdefs.h
+
+
+fi
+
+
+# flock
+for ac_func in flock
+do :
+  ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock"
+if test "x$ac_cv_func_flock" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_FLOCK 1
+_ACEOF
+
+fi
+done
+
+if test "$ac_cv_header_sys_file_h" = yes && test "$ac_cv_func_flock" = yes; then
+
+$as_echo "#define HAVE_FLOCK 1" >>confdefs.h
+
+fi
+
+# unsetenv
+for ac_func in unsetenv
+do :
+  ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_UNSETENV 1
+_ACEOF
+
+fi
+done
+
+
+###  POSIX.1003.1 unsetenv returns 0 or -1 (EINVAL), but older implementations
+###  in common use return void.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of unsetenv" >&5
+$as_echo_n "checking return type of unsetenv... " >&6; }
+if ${fptools_cv_func_unsetenv_return_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "void[      ]+unsetenv" >/dev/null 2>&1; then :
+  fptools_cv_func_unsetenv_return_type=void
+else
+  fptools_cv_func_unsetenv_return_type=int
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_func_unsetenv_return_type" >&5
+$as_echo "$fptools_cv_func_unsetenv_return_type" >&6; }
+case "$fptools_cv_func_unsetenv_return_type" in
+  "void" )
+
+$as_echo "#define UNSETENV_RETURNS_VOID 1" >>confdefs.h
+
+  ;;
+esac
+
+
+
+# Check whether --with-iconv-includes was given.
+if test "${with_iconv_includes+set}" = set; then :
+  withval=$with_iconv_includes; ICONV_INCLUDE_DIRS=$withval; CPPFLAGS="-I$withval $CPPFLAGS"
+else
+  ICONV_INCLUDE_DIRS=
+fi
+
+
+
+# Check whether --with-iconv-libraries was given.
+if test "${with_iconv_libraries+set}" = set; then :
+  withval=$with_iconv_libraries; ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval $LDFLAGS"
+else
+  ICONV_LIB_DIRS=
+fi
+
+
+
+
+
+# map standard C types and ISO types to Haskell types
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for char" >&5
+$as_echo_n "checking Haskell type for char... " >&6; }
+    if ${fptools_cv_htype_char+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_char=yes
+        if ac_fn_c_compute_int "$LINENO" "(char)0.2 - (char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+char val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_char="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_char=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_char=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_char=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_char=LDouble
+                else
+                    fptools_cv_htype_sup_char=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((char)(-1)) < ((char)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_char=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(char) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_char=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_char="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_char="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_char" = no
+    then
+
+        fptools_cv_htype_char=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_char" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_char" >&5
+$as_echo "$fptools_cv_htype_char" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_CHAR $fptools_cv_htype_char
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for signed char" >&5
+$as_echo_n "checking Haskell type for signed char... " >&6; }
+    if ${fptools_cv_htype_signed_char+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_signed_char=yes
+        if ac_fn_c_compute_int "$LINENO" "(signed char)0.2 - (signed char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+signed char val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_signed_char="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_signed_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_signed_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_signed_char=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_signed_char=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_signed_char=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_signed_char=LDouble
+                else
+                    fptools_cv_htype_sup_signed_char=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((signed char)(-1)) < ((signed char)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_signed_char=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(signed char) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_signed_char=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_signed_char="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_signed_char="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_signed_char" = no
+    then
+
+        fptools_cv_htype_signed_char=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_signed_char" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_signed_char" >&5
+$as_echo "$fptools_cv_htype_signed_char" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SIGNED_CHAR $fptools_cv_htype_signed_char
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned char" >&5
+$as_echo_n "checking Haskell type for unsigned char... " >&6; }
+    if ${fptools_cv_htype_unsigned_char+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_unsigned_char=yes
+        if ac_fn_c_compute_int "$LINENO" "(unsigned char)0.2 - (unsigned char)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+unsigned char val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_unsigned_char="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_char=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_char=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_unsigned_char=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_char=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_char=LDouble
+                else
+                    fptools_cv_htype_sup_unsigned_char=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((unsigned char)(-1)) < ((unsigned char)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_char=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned char) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_char=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_unsigned_char="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_unsigned_char="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_unsigned_char" = no
+    then
+
+        fptools_cv_htype_unsigned_char=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_unsigned_char" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_char" >&5
+$as_echo "$fptools_cv_htype_unsigned_char" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UNSIGNED_CHAR $fptools_cv_htype_unsigned_char
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for short" >&5
+$as_echo_n "checking Haskell type for short... " >&6; }
+    if ${fptools_cv_htype_short+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_short=yes
+        if ac_fn_c_compute_int "$LINENO" "(short)0.2 - (short)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+short val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_short="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_short=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_short=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(short) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_short=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_short=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_short=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_short=LDouble
+                else
+                    fptools_cv_htype_sup_short=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((short)(-1)) < ((short)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_short=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(short) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_short=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_short="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_short="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_short" = no
+    then
+
+        fptools_cv_htype_short=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_short" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_short" >&5
+$as_echo "$fptools_cv_htype_short" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SHORT $fptools_cv_htype_short
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned short" >&5
+$as_echo_n "checking Haskell type for unsigned short... " >&6; }
+    if ${fptools_cv_htype_unsigned_short+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_unsigned_short=yes
+        if ac_fn_c_compute_int "$LINENO" "(unsigned short)0.2 - (unsigned short)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+unsigned short val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_unsigned_short="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_short=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_short=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_short=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_unsigned_short=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_short=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_short=LDouble
+                else
+                    fptools_cv_htype_sup_unsigned_short=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((unsigned short)(-1)) < ((unsigned short)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_short=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned short) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_short=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_unsigned_short="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_unsigned_short="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_unsigned_short" = no
+    then
+
+        fptools_cv_htype_unsigned_short=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_unsigned_short" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_short" >&5
+$as_echo "$fptools_cv_htype_unsigned_short" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UNSIGNED_SHORT $fptools_cv_htype_unsigned_short
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for int" >&5
+$as_echo_n "checking Haskell type for int... " >&6; }
+    if ${fptools_cv_htype_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_int=yes
+        if ac_fn_c_compute_int "$LINENO" "(int)0.2 - (int)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+int val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_int="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_int=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_int=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(int) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_int=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_int=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_int=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_int=LDouble
+                else
+                    fptools_cv_htype_sup_int=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((int)(-1)) < ((int)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_int=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(int) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_int=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_int="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_int="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_int" = no
+    then
+
+        fptools_cv_htype_int=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_int" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_int" >&5
+$as_echo "$fptools_cv_htype_int" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_INT $fptools_cv_htype_int
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned int" >&5
+$as_echo_n "checking Haskell type for unsigned int... " >&6; }
+    if ${fptools_cv_htype_unsigned_int+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_unsigned_int=yes
+        if ac_fn_c_compute_int "$LINENO" "(unsigned int)0.2 - (unsigned int)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+unsigned int val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_unsigned_int="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_int=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_int=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_int=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_unsigned_int=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_int=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_int=LDouble
+                else
+                    fptools_cv_htype_sup_unsigned_int=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((unsigned int)(-1)) < ((unsigned int)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_int=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned int) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_int=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_unsigned_int="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_unsigned_int="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_unsigned_int" = no
+    then
+
+        fptools_cv_htype_unsigned_int=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_unsigned_int" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_int" >&5
+$as_echo "$fptools_cv_htype_unsigned_int" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UNSIGNED_INT $fptools_cv_htype_unsigned_int
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for long" >&5
+$as_echo_n "checking Haskell type for long... " >&6; }
+    if ${fptools_cv_htype_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_long=yes
+        if ac_fn_c_compute_int "$LINENO" "(long)0.2 - (long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+long val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_long="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_long=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_long=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_long=LDouble
+                else
+                    fptools_cv_htype_sup_long=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((long)(-1)) < ((long)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(long) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_long="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_long="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_long" = no
+    then
+
+        fptools_cv_htype_long=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_long" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_long" >&5
+$as_echo "$fptools_cv_htype_long" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_LONG $fptools_cv_htype_long
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned long" >&5
+$as_echo_n "checking Haskell type for unsigned long... " >&6; }
+    if ${fptools_cv_htype_unsigned_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_unsigned_long=yes
+        if ac_fn_c_compute_int "$LINENO" "(unsigned long)0.2 - (unsigned long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+unsigned long val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_unsigned_long="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long=LDouble
+                else
+                    fptools_cv_htype_sup_unsigned_long=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((unsigned long)(-1)) < ((unsigned long)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_unsigned_long="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_unsigned_long="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_unsigned_long" = no
+    then
+
+        fptools_cv_htype_unsigned_long=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_unsigned_long" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_long" >&5
+$as_echo "$fptools_cv_htype_unsigned_long" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UNSIGNED_LONG $fptools_cv_htype_unsigned_long
+_ACEOF
+
+    fi
+
+
+if test "$ac_cv_type_long_long" = yes; then
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for long long" >&5
+$as_echo_n "checking Haskell type for long long... " >&6; }
+    if ${fptools_cv_htype_long_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_long_long=yes
+        if ac_fn_c_compute_int "$LINENO" "(long long)0.2 - (long long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+long long val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_long_long="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(long long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long_long=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_long_long=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_long_long=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_long_long=LDouble
+                else
+                    fptools_cv_htype_sup_long_long=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((long long)(-1)) < ((long long)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long_long=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(long long) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_long_long=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_long_long="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_long_long="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_long_long" = no
+    then
+
+        fptools_cv_htype_long_long=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_long_long" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_long_long" >&5
+$as_echo "$fptools_cv_htype_long_long" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_LONG_LONG $fptools_cv_htype_long_long
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for unsigned long long" >&5
+$as_echo_n "checking Haskell type for unsigned long long... " >&6; }
+    if ${fptools_cv_htype_unsigned_long_long+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_unsigned_long_long=yes
+        if ac_fn_c_compute_int "$LINENO" "(unsigned long long)0.2 - (unsigned long long)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+unsigned long long val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_unsigned_long_long="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long_long=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long_long=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long_long=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long_long=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_unsigned_long_long=LDouble
+                else
+                    fptools_cv_htype_sup_unsigned_long_long=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((unsigned long long)(-1)) < ((unsigned long long)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long_long=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(unsigned long long) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_unsigned_long_long=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_unsigned_long_long="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_unsigned_long_long="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_unsigned_long_long" = no
+    then
+
+        fptools_cv_htype_unsigned_long_long=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_unsigned_long_long" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_unsigned_long_long" >&5
+$as_echo "$fptools_cv_htype_unsigned_long_long" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UNSIGNED_LONG_LONG $fptools_cv_htype_unsigned_long_long
+_ACEOF
+
+    fi
+
+
+fi
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for bool" >&5
+$as_echo_n "checking Haskell type for bool... " >&6; }
+    if ${fptools_cv_htype_bool+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_bool=yes
+        if ac_fn_c_compute_int "$LINENO" "(bool)0.2 - (bool)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+bool val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_bool="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_bool=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_bool=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(bool) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_bool=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_bool=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_bool=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_bool=LDouble
+                else
+                    fptools_cv_htype_sup_bool=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((bool)(-1)) < ((bool)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_bool=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(bool) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_bool=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_bool="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_bool="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_bool" = no
+    then
+
+        fptools_cv_htype_bool=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_bool" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_bool" >&5
+$as_echo "$fptools_cv_htype_bool" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_BOOL $fptools_cv_htype_bool
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for float" >&5
+$as_echo_n "checking Haskell type for float... " >&6; }
+    if ${fptools_cv_htype_float+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_float=yes
+        if ac_fn_c_compute_int "$LINENO" "(float)0.2 - (float)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+float val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_float="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_float=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_float=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(float) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_float=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_float=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_float=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_float=LDouble
+                else
+                    fptools_cv_htype_sup_float=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((float)(-1)) < ((float)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_float=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(float) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_float=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_float="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_float="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_float" = no
+    then
+
+        fptools_cv_htype_float=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_float" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_float" >&5
+$as_echo "$fptools_cv_htype_float" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_FLOAT $fptools_cv_htype_float
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for double" >&5
+$as_echo_n "checking Haskell type for double... " >&6; }
+    if ${fptools_cv_htype_double+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_double=yes
+        if ac_fn_c_compute_int "$LINENO" "(double)0.2 - (double)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+double val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_double="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_double=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_double=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(double) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_double=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_double=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_double=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_double=LDouble
+                else
+                    fptools_cv_htype_sup_double=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((double)(-1)) < ((double)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_double=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(double) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_double=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_double="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_double="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_double" = no
+    then
+
+        fptools_cv_htype_double=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_double" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_double" >&5
+$as_echo "$fptools_cv_htype_double" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_DOUBLE $fptools_cv_htype_double
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ptrdiff_t" >&5
+$as_echo_n "checking Haskell type for ptrdiff_t... " >&6; }
+    if ${fptools_cv_htype_ptrdiff_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_ptrdiff_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(ptrdiff_t)0.2 - (ptrdiff_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+ptrdiff_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_ptrdiff_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ptrdiff_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ptrdiff_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ptrdiff_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_ptrdiff_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ptrdiff_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ptrdiff_t=LDouble
+                else
+                    fptools_cv_htype_sup_ptrdiff_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((ptrdiff_t)(-1)) < ((ptrdiff_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ptrdiff_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(ptrdiff_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ptrdiff_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_ptrdiff_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_ptrdiff_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_ptrdiff_t" = no
+    then
+
+        fptools_cv_htype_ptrdiff_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_ptrdiff_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ptrdiff_t" >&5
+$as_echo "$fptools_cv_htype_ptrdiff_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_PTRDIFF_T $fptools_cv_htype_ptrdiff_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for size_t" >&5
+$as_echo_n "checking Haskell type for size_t... " >&6; }
+    if ${fptools_cv_htype_size_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_size_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(size_t)0.2 - (size_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+size_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_size_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_size_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_size_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_size_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_size_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_size_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_size_t=LDouble
+                else
+                    fptools_cv_htype_sup_size_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((size_t)(-1)) < ((size_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_size_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(size_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_size_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_size_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_size_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_size_t" = no
+    then
+
+        fptools_cv_htype_size_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_size_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_size_t" >&5
+$as_echo "$fptools_cv_htype_size_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SIZE_T $fptools_cv_htype_size_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for wchar_t" >&5
+$as_echo_n "checking Haskell type for wchar_t... " >&6; }
+    if ${fptools_cv_htype_wchar_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_wchar_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(wchar_t)0.2 - (wchar_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+wchar_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_wchar_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_wchar_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_wchar_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_wchar_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_wchar_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_wchar_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_wchar_t=LDouble
+                else
+                    fptools_cv_htype_sup_wchar_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((wchar_t)(-1)) < ((wchar_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_wchar_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(wchar_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_wchar_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_wchar_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_wchar_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_wchar_t" = no
+    then
+
+        fptools_cv_htype_wchar_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_wchar_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_wchar_t" >&5
+$as_echo "$fptools_cv_htype_wchar_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_WCHAR_T $fptools_cv_htype_wchar_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for sig_atomic_t" >&5
+$as_echo_n "checking Haskell type for sig_atomic_t... " >&6; }
+    if ${fptools_cv_htype_sig_atomic_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_sig_atomic_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(sig_atomic_t)0.2 - (sig_atomic_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+sig_atomic_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_sig_atomic_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_sig_atomic_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_sig_atomic_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_sig_atomic_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_sig_atomic_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_sig_atomic_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_sig_atomic_t=LDouble
+                else
+                    fptools_cv_htype_sup_sig_atomic_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((sig_atomic_t)(-1)) < ((sig_atomic_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_sig_atomic_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(sig_atomic_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_sig_atomic_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_sig_atomic_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_sig_atomic_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_sig_atomic_t" = no
+    then
+
+        fptools_cv_htype_sig_atomic_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_sig_atomic_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_sig_atomic_t" >&5
+$as_echo "$fptools_cv_htype_sig_atomic_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SIG_ATOMIC_T $fptools_cv_htype_sig_atomic_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for clock_t" >&5
+$as_echo_n "checking Haskell type for clock_t... " >&6; }
+    if ${fptools_cv_htype_clock_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_clock_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(clock_t)0.2 - (clock_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+clock_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_clock_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clock_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clock_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clock_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_clock_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_clock_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_clock_t=LDouble
+                else
+                    fptools_cv_htype_sup_clock_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((clock_t)(-1)) < ((clock_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clock_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(clock_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clock_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_clock_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_clock_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_clock_t" = no
+    then
+
+        fptools_cv_htype_clock_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_clock_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_clock_t" >&5
+$as_echo "$fptools_cv_htype_clock_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_CLOCK_T $fptools_cv_htype_clock_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for time_t" >&5
+$as_echo_n "checking Haskell type for time_t... " >&6; }
+    if ${fptools_cv_htype_time_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_time_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(time_t)0.2 - (time_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+time_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_time_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_time_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_time_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_time_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_time_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_time_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_time_t=LDouble
+                else
+                    fptools_cv_htype_sup_time_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((time_t)(-1)) < ((time_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_time_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(time_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_time_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_time_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_time_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_time_t" = no
+    then
+
+        fptools_cv_htype_time_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_time_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_time_t" >&5
+$as_echo "$fptools_cv_htype_time_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_TIME_T $fptools_cv_htype_time_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for useconds_t" >&5
+$as_echo_n "checking Haskell type for useconds_t... " >&6; }
+    if ${fptools_cv_htype_useconds_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_useconds_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(useconds_t)0.2 - (useconds_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+useconds_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_useconds_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_useconds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_useconds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_useconds_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_useconds_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_useconds_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_useconds_t=LDouble
+                else
+                    fptools_cv_htype_sup_useconds_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((useconds_t)(-1)) < ((useconds_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_useconds_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(useconds_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_useconds_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_useconds_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_useconds_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_useconds_t" = no
+    then
+
+        fptools_cv_htype_useconds_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_useconds_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_useconds_t" >&5
+$as_echo "$fptools_cv_htype_useconds_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_USECONDS_T $fptools_cv_htype_useconds_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for suseconds_t" >&5
+$as_echo_n "checking Haskell type for suseconds_t... " >&6; }
+    if ${fptools_cv_htype_suseconds_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_suseconds_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(suseconds_t)0.2 - (suseconds_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+suseconds_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_suseconds_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_suseconds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_suseconds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_suseconds_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_suseconds_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_suseconds_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_suseconds_t=LDouble
+                else
+                    fptools_cv_htype_sup_suseconds_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((suseconds_t)(-1)) < ((suseconds_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_suseconds_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(suseconds_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_suseconds_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_suseconds_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_suseconds_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_suseconds_t" = no
+    then
+        if test "$WINDOWS" = "YES"
+                          then
+                              fptools_cv_htype_suseconds_t=Int32
+                              fptools_cv_htype_sup_suseconds_t=yes
+                          else
+                              as_fn_error $? "type not found" "$LINENO" 5
+                          fi
+    fi
+
+            if test "$fptools_cv_htype_sup_suseconds_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_suseconds_t" >&5
+$as_echo "$fptools_cv_htype_suseconds_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SUSECONDS_T $fptools_cv_htype_suseconds_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for dev_t" >&5
+$as_echo_n "checking Haskell type for dev_t... " >&6; }
+    if ${fptools_cv_htype_dev_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_dev_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(dev_t)0.2 - (dev_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+dev_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_dev_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_dev_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_dev_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_dev_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_dev_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_dev_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_dev_t=LDouble
+                else
+                    fptools_cv_htype_sup_dev_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((dev_t)(-1)) < ((dev_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_dev_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(dev_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_dev_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_dev_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_dev_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_dev_t" = no
+    then
+
+        fptools_cv_htype_dev_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_dev_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_dev_t" >&5
+$as_echo "$fptools_cv_htype_dev_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_DEV_T $fptools_cv_htype_dev_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ino_t" >&5
+$as_echo_n "checking Haskell type for ino_t... " >&6; }
+    if ${fptools_cv_htype_ino_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_ino_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(ino_t)0.2 - (ino_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+ino_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_ino_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ino_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ino_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ino_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_ino_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ino_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ino_t=LDouble
+                else
+                    fptools_cv_htype_sup_ino_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((ino_t)(-1)) < ((ino_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ino_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(ino_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ino_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_ino_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_ino_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_ino_t" = no
+    then
+
+        fptools_cv_htype_ino_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_ino_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ino_t" >&5
+$as_echo "$fptools_cv_htype_ino_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_INO_T $fptools_cv_htype_ino_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for mode_t" >&5
+$as_echo_n "checking Haskell type for mode_t... " >&6; }
+    if ${fptools_cv_htype_mode_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_mode_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(mode_t)0.2 - (mode_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+mode_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_mode_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_mode_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_mode_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_mode_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_mode_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_mode_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_mode_t=LDouble
+                else
+                    fptools_cv_htype_sup_mode_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((mode_t)(-1)) < ((mode_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_mode_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(mode_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_mode_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_mode_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_mode_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_mode_t" = no
+    then
+
+        fptools_cv_htype_mode_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_mode_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_mode_t" >&5
+$as_echo "$fptools_cv_htype_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_MODE_T $fptools_cv_htype_mode_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for off_t" >&5
+$as_echo_n "checking Haskell type for off_t... " >&6; }
+    if ${fptools_cv_htype_off_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_off_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(off_t)0.2 - (off_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+off_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_off_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_off_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_off_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_off_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_off_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_off_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_off_t=LDouble
+                else
+                    fptools_cv_htype_sup_off_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((off_t)(-1)) < ((off_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_off_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(off_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_off_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_off_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_off_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_off_t" = no
+    then
+
+        fptools_cv_htype_off_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_off_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_off_t" >&5
+$as_echo "$fptools_cv_htype_off_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_OFF_T $fptools_cv_htype_off_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for pid_t" >&5
+$as_echo_n "checking Haskell type for pid_t... " >&6; }
+    if ${fptools_cv_htype_pid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_pid_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(pid_t)0.2 - (pid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+pid_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_pid_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_pid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_pid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_pid_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_pid_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_pid_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_pid_t=LDouble
+                else
+                    fptools_cv_htype_sup_pid_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((pid_t)(-1)) < ((pid_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_pid_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(pid_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_pid_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_pid_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_pid_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_pid_t" = no
+    then
+
+        fptools_cv_htype_pid_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_pid_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_pid_t" >&5
+$as_echo "$fptools_cv_htype_pid_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_PID_T $fptools_cv_htype_pid_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for gid_t" >&5
+$as_echo_n "checking Haskell type for gid_t... " >&6; }
+    if ${fptools_cv_htype_gid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_gid_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(gid_t)0.2 - (gid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+gid_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_gid_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_gid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_gid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_gid_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_gid_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_gid_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_gid_t=LDouble
+                else
+                    fptools_cv_htype_sup_gid_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((gid_t)(-1)) < ((gid_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_gid_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(gid_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_gid_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_gid_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_gid_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_gid_t" = no
+    then
+
+        fptools_cv_htype_gid_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_gid_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_gid_t" >&5
+$as_echo "$fptools_cv_htype_gid_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_GID_T $fptools_cv_htype_gid_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uid_t" >&5
+$as_echo_n "checking Haskell type for uid_t... " >&6; }
+    if ${fptools_cv_htype_uid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_uid_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(uid_t)0.2 - (uid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+uid_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_uid_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uid_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_uid_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uid_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uid_t=LDouble
+                else
+                    fptools_cv_htype_sup_uid_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((uid_t)(-1)) < ((uid_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uid_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(uid_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uid_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_uid_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_uid_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_uid_t" = no
+    then
+
+        fptools_cv_htype_uid_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_uid_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uid_t" >&5
+$as_echo "$fptools_cv_htype_uid_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UID_T $fptools_cv_htype_uid_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for cc_t" >&5
+$as_echo_n "checking Haskell type for cc_t... " >&6; }
+    if ${fptools_cv_htype_cc_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_cc_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(cc_t)0.2 - (cc_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+cc_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_cc_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_cc_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_cc_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_cc_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_cc_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_cc_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_cc_t=LDouble
+                else
+                    fptools_cv_htype_sup_cc_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((cc_t)(-1)) < ((cc_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_cc_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(cc_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_cc_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_cc_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_cc_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_cc_t" = no
+    then
+
+        fptools_cv_htype_cc_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_cc_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_cc_t" >&5
+$as_echo "$fptools_cv_htype_cc_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_CC_T $fptools_cv_htype_cc_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for speed_t" >&5
+$as_echo_n "checking Haskell type for speed_t... " >&6; }
+    if ${fptools_cv_htype_speed_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_speed_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(speed_t)0.2 - (speed_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+speed_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_speed_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_speed_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_speed_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_speed_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_speed_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_speed_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_speed_t=LDouble
+                else
+                    fptools_cv_htype_sup_speed_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((speed_t)(-1)) < ((speed_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_speed_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(speed_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_speed_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_speed_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_speed_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_speed_t" = no
+    then
+
+        fptools_cv_htype_speed_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_speed_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_speed_t" >&5
+$as_echo "$fptools_cv_htype_speed_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SPEED_T $fptools_cv_htype_speed_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for tcflag_t" >&5
+$as_echo_n "checking Haskell type for tcflag_t... " >&6; }
+    if ${fptools_cv_htype_tcflag_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_tcflag_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(tcflag_t)0.2 - (tcflag_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+tcflag_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_tcflag_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_tcflag_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_tcflag_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_tcflag_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_tcflag_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_tcflag_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_tcflag_t=LDouble
+                else
+                    fptools_cv_htype_sup_tcflag_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((tcflag_t)(-1)) < ((tcflag_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_tcflag_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(tcflag_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_tcflag_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_tcflag_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_tcflag_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_tcflag_t" = no
+    then
+
+        fptools_cv_htype_tcflag_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_tcflag_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_tcflag_t" >&5
+$as_echo "$fptools_cv_htype_tcflag_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_TCFLAG_T $fptools_cv_htype_tcflag_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for nlink_t" >&5
+$as_echo_n "checking Haskell type for nlink_t... " >&6; }
+    if ${fptools_cv_htype_nlink_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_nlink_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(nlink_t)0.2 - (nlink_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+nlink_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_nlink_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nlink_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nlink_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nlink_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_nlink_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_nlink_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_nlink_t=LDouble
+                else
+                    fptools_cv_htype_sup_nlink_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((nlink_t)(-1)) < ((nlink_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nlink_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(nlink_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nlink_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_nlink_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_nlink_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_nlink_t" = no
+    then
+
+        fptools_cv_htype_nlink_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_nlink_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_nlink_t" >&5
+$as_echo "$fptools_cv_htype_nlink_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_NLINK_T $fptools_cv_htype_nlink_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for ssize_t" >&5
+$as_echo_n "checking Haskell type for ssize_t... " >&6; }
+    if ${fptools_cv_htype_ssize_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_ssize_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(ssize_t)0.2 - (ssize_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+ssize_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_ssize_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ssize_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ssize_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ssize_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_ssize_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ssize_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_ssize_t=LDouble
+                else
+                    fptools_cv_htype_sup_ssize_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((ssize_t)(-1)) < ((ssize_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ssize_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(ssize_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_ssize_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_ssize_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_ssize_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_ssize_t" = no
+    then
+
+        fptools_cv_htype_ssize_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_ssize_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_ssize_t" >&5
+$as_echo "$fptools_cv_htype_ssize_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SSIZE_T $fptools_cv_htype_ssize_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for rlim_t" >&5
+$as_echo_n "checking Haskell type for rlim_t... " >&6; }
+    if ${fptools_cv_htype_rlim_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_rlim_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(rlim_t)0.2 - (rlim_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+rlim_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_rlim_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_rlim_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_rlim_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_rlim_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_rlim_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_rlim_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_rlim_t=LDouble
+                else
+                    fptools_cv_htype_sup_rlim_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((rlim_t)(-1)) < ((rlim_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_rlim_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(rlim_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_rlim_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_rlim_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_rlim_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_rlim_t" = no
+    then
+
+        fptools_cv_htype_rlim_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_rlim_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_rlim_t" >&5
+$as_echo "$fptools_cv_htype_rlim_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_RLIM_T $fptools_cv_htype_rlim_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for blksize_t" >&5
+$as_echo_n "checking Haskell type for blksize_t... " >&6; }
+    if ${fptools_cv_htype_blksize_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_blksize_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(blksize_t)0.2 - (blksize_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+blksize_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_blksize_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blksize_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blksize_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blksize_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_blksize_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_blksize_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_blksize_t=LDouble
+                else
+                    fptools_cv_htype_sup_blksize_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((blksize_t)(-1)) < ((blksize_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blksize_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(blksize_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blksize_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_blksize_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_blksize_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_blksize_t" = no
+    then
+
+        fptools_cv_htype_blksize_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_blksize_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_blksize_t" >&5
+$as_echo "$fptools_cv_htype_blksize_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_BLKSIZE_T $fptools_cv_htype_blksize_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for blkcnt_t" >&5
+$as_echo_n "checking Haskell type for blkcnt_t... " >&6; }
+    if ${fptools_cv_htype_blkcnt_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_blkcnt_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(blkcnt_t)0.2 - (blkcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+blkcnt_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_blkcnt_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blkcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blkcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blkcnt_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_blkcnt_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_blkcnt_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_blkcnt_t=LDouble
+                else
+                    fptools_cv_htype_sup_blkcnt_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((blkcnt_t)(-1)) < ((blkcnt_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blkcnt_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(blkcnt_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_blkcnt_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_blkcnt_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_blkcnt_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_blkcnt_t" = no
+    then
+
+        fptools_cv_htype_blkcnt_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_blkcnt_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_blkcnt_t" >&5
+$as_echo "$fptools_cv_htype_blkcnt_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_BLKCNT_T $fptools_cv_htype_blkcnt_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for clockid_t" >&5
+$as_echo_n "checking Haskell type for clockid_t... " >&6; }
+    if ${fptools_cv_htype_clockid_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_clockid_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(clockid_t)0.2 - (clockid_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+clockid_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_clockid_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clockid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clockid_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clockid_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_clockid_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_clockid_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_clockid_t=LDouble
+                else
+                    fptools_cv_htype_sup_clockid_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((clockid_t)(-1)) < ((clockid_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clockid_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(clockid_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_clockid_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_clockid_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_clockid_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_clockid_t" = no
+    then
+
+        fptools_cv_htype_clockid_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_clockid_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_clockid_t" >&5
+$as_echo "$fptools_cv_htype_clockid_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_CLOCKID_T $fptools_cv_htype_clockid_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for fsblkcnt_t" >&5
+$as_echo_n "checking Haskell type for fsblkcnt_t... " >&6; }
+    if ${fptools_cv_htype_fsblkcnt_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_fsblkcnt_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(fsblkcnt_t)0.2 - (fsblkcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+fsblkcnt_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_fsblkcnt_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsblkcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsblkcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsblkcnt_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_fsblkcnt_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_fsblkcnt_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_fsblkcnt_t=LDouble
+                else
+                    fptools_cv_htype_sup_fsblkcnt_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((fsblkcnt_t)(-1)) < ((fsblkcnt_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsblkcnt_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(fsblkcnt_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsblkcnt_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_fsblkcnt_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_fsblkcnt_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_fsblkcnt_t" = no
+    then
+
+        fptools_cv_htype_fsblkcnt_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_fsblkcnt_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_fsblkcnt_t" >&5
+$as_echo "$fptools_cv_htype_fsblkcnt_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_FSBLKCNT_T $fptools_cv_htype_fsblkcnt_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for fsfilcnt_t" >&5
+$as_echo_n "checking Haskell type for fsfilcnt_t... " >&6; }
+    if ${fptools_cv_htype_fsfilcnt_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_fsfilcnt_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(fsfilcnt_t)0.2 - (fsfilcnt_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+fsfilcnt_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_fsfilcnt_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsfilcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsfilcnt_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsfilcnt_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_fsfilcnt_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_fsfilcnt_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_fsfilcnt_t=LDouble
+                else
+                    fptools_cv_htype_sup_fsfilcnt_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((fsfilcnt_t)(-1)) < ((fsfilcnt_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsfilcnt_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(fsfilcnt_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_fsfilcnt_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_fsfilcnt_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_fsfilcnt_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_fsfilcnt_t" = no
+    then
+
+        fptools_cv_htype_fsfilcnt_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_fsfilcnt_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_fsfilcnt_t" >&5
+$as_echo "$fptools_cv_htype_fsfilcnt_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_FSFILCNT_T $fptools_cv_htype_fsfilcnt_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for id_t" >&5
+$as_echo_n "checking Haskell type for id_t... " >&6; }
+    if ${fptools_cv_htype_id_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_id_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(id_t)0.2 - (id_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+id_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_id_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_id_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_id_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_id_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_id_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_id_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_id_t=LDouble
+                else
+                    fptools_cv_htype_sup_id_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((id_t)(-1)) < ((id_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_id_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(id_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_id_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_id_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_id_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_id_t" = no
+    then
+
+        fptools_cv_htype_id_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_id_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_id_t" >&5
+$as_echo "$fptools_cv_htype_id_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_ID_T $fptools_cv_htype_id_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for key_t" >&5
+$as_echo_n "checking Haskell type for key_t... " >&6; }
+    if ${fptools_cv_htype_key_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_key_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(key_t)0.2 - (key_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+key_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_key_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_key_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_key_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_key_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_key_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_key_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_key_t=LDouble
+                else
+                    fptools_cv_htype_sup_key_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((key_t)(-1)) < ((key_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_key_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(key_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_key_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_key_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_key_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_key_t" = no
+    then
+
+        fptools_cv_htype_key_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_key_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_key_t" >&5
+$as_echo "$fptools_cv_htype_key_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_KEY_T $fptools_cv_htype_key_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for timer_t" >&5
+$as_echo_n "checking Haskell type for timer_t... " >&6; }
+    if ${fptools_cv_htype_timer_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_timer_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(timer_t)0.2 - (timer_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+timer_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_timer_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_timer_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_timer_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_timer_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_timer_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_timer_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_timer_t=LDouble
+                else
+                    fptools_cv_htype_sup_timer_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((timer_t)(-1)) < ((timer_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_timer_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(timer_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_timer_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_timer_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_timer_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_timer_t" = no
+    then
+
+        fptools_cv_htype_timer_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_timer_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_timer_t" >&5
+$as_echo "$fptools_cv_htype_timer_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_TIMER_T $fptools_cv_htype_timer_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for socklen_t" >&5
+$as_echo_n "checking Haskell type for socklen_t... " >&6; }
+    if ${fptools_cv_htype_socklen_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_socklen_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(socklen_t)0.2 - (socklen_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+socklen_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_socklen_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(socklen_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_socklen_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(socklen_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_socklen_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(socklen_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_socklen_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_socklen_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_socklen_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_socklen_t=LDouble
+                else
+                    fptools_cv_htype_sup_socklen_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((socklen_t)(-1)) < ((socklen_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_socklen_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(socklen_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_socklen_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_socklen_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_socklen_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_socklen_t" = no
+    then
+
+        fptools_cv_htype_socklen_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_socklen_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_socklen_t" >&5
+$as_echo "$fptools_cv_htype_socklen_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_SOCKLEN_T $fptools_cv_htype_socklen_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for nfds_t" >&5
+$as_echo_n "checking Haskell type for nfds_t... " >&6; }
+    if ${fptools_cv_htype_nfds_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_nfds_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(nfds_t)0.2 - (nfds_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+nfds_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_nfds_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nfds_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nfds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nfds_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nfds_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(nfds_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nfds_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_nfds_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_nfds_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_nfds_t=LDouble
+                else
+                    fptools_cv_htype_sup_nfds_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((nfds_t)(-1)) < ((nfds_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nfds_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(nfds_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_nfds_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_nfds_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_nfds_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_nfds_t" = no
+    then
+
+        fptools_cv_htype_nfds_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_nfds_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_nfds_t" >&5
+$as_echo "$fptools_cv_htype_nfds_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_NFDS_T $fptools_cv_htype_nfds_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for intptr_t" >&5
+$as_echo_n "checking Haskell type for intptr_t... " >&6; }
+    if ${fptools_cv_htype_intptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_intptr_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(intptr_t)0.2 - (intptr_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+intptr_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_intptr_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intptr_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intptr_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intptr_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_intptr_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_intptr_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_intptr_t=LDouble
+                else
+                    fptools_cv_htype_sup_intptr_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((intptr_t)(-1)) < ((intptr_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intptr_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(intptr_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intptr_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_intptr_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_intptr_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_intptr_t" = no
+    then
+
+        fptools_cv_htype_intptr_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_intptr_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_intptr_t" >&5
+$as_echo "$fptools_cv_htype_intptr_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_INTPTR_T $fptools_cv_htype_intptr_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uintptr_t" >&5
+$as_echo_n "checking Haskell type for uintptr_t... " >&6; }
+    if ${fptools_cv_htype_uintptr_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_uintptr_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(uintptr_t)0.2 - (uintptr_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+uintptr_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_uintptr_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintptr_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintptr_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintptr_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_uintptr_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uintptr_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uintptr_t=LDouble
+                else
+                    fptools_cv_htype_sup_uintptr_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((uintptr_t)(-1)) < ((uintptr_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintptr_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(uintptr_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintptr_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_uintptr_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_uintptr_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_uintptr_t" = no
+    then
+
+        fptools_cv_htype_uintptr_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_uintptr_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uintptr_t" >&5
+$as_echo "$fptools_cv_htype_uintptr_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UINTPTR_T $fptools_cv_htype_uintptr_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for intmax_t" >&5
+$as_echo_n "checking Haskell type for intmax_t... " >&6; }
+    if ${fptools_cv_htype_intmax_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_intmax_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(intmax_t)0.2 - (intmax_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+intmax_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_intmax_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intmax_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intmax_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intmax_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_intmax_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_intmax_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_intmax_t=LDouble
+                else
+                    fptools_cv_htype_sup_intmax_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((intmax_t)(-1)) < ((intmax_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intmax_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(intmax_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_intmax_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_intmax_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_intmax_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_intmax_t" = no
+    then
+
+        fptools_cv_htype_intmax_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_intmax_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_intmax_t" >&5
+$as_echo "$fptools_cv_htype_intmax_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_INTMAX_T $fptools_cv_htype_intmax_t
+_ACEOF
+
+    fi
+
+
+
+
+
+
+
+
+
+
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking Haskell type for uintmax_t" >&5
+$as_echo_n "checking Haskell type for uintmax_t... " >&6; }
+    if ${fptools_cv_htype_uintmax_t+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+
+        fptools_cv_htype_sup_uintmax_t=yes
+        if ac_fn_c_compute_int "$LINENO" "(uintmax_t)0.2 - (uintmax_t)0.4 < 0 ? 0 : 1" "HTYPE_IS_INTEGRAL"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  HTYPE_IS_INTEGRAL=0
+fi
+
+
+
+        if test "$HTYPE_IS_INTEGRAL" -eq 0
+        then
+                                                            cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+
+int
+main ()
+{
+uintmax_t val; *val;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  HTYPE_IS_POINTER=yes
+else
+  HTYPE_IS_POINTER=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+            if test "$HTYPE_IS_POINTER" = yes
+            then
+                fptools_cv_htype_uintmax_t="Ptr ()"
+            else
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(float)" "HTYPE_IS_FLOAT"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintmax_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(double)" "HTYPE_IS_DOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintmax_t=no
+fi
+
+
+                if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) == sizeof(long double)" "HTYPE_IS_LDOUBLE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintmax_t=no
+fi
+
+
+                if test "$HTYPE_IS_FLOAT" -eq 1
+                then
+                    fptools_cv_htype_uintmax_t=Float
+                elif test "$HTYPE_IS_DOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uintmax_t=Double
+                elif test "$HTYPE_IS_LDOUBLE" -eq 1
+                then
+                    fptools_cv_htype_uintmax_t=LDouble
+                else
+                    fptools_cv_htype_sup_uintmax_t=no
+                fi
+            fi
+        else
+            if ac_fn_c_compute_int "$LINENO" "((uintmax_t)(-1)) < ((uintmax_t)0)" "HTYPE_IS_SIGNED"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintmax_t=no
+fi
+
+
+            if ac_fn_c_compute_int "$LINENO" "sizeof(uintmax_t) * 8" "HTYPE_SIZE"        "
+#include <stdbool.h>
+#include <stdio.h>
+#include <stddef.h>
+
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+
+#if HAVE_SIGNAL_H
+# include <signal.h>
+#endif
+
+#if HAVE_TIME_H
+# include <time.h>
+#endif
+
+#if HAVE_TERMIOS_H
+# include <termios.h>
+#endif
+
+#if HAVE_STRING_H
+# include <string.h>
+#endif
+
+#if HAVE_CTYPE_H
+# include <ctype.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+
+#if HAVE_SYS_RESOURCE_H
+# include <sys/resource.h>
+#endif
+
+#if HAVE_POLL_H
+# include <poll.h>
+#endif
+
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+
+#include <stdlib.h>
+"; then :
+
+else
+  fptools_cv_htype_sup_uintmax_t=no
+fi
+
+
+            if test "$HTYPE_IS_SIGNED" -eq 0
+            then
+                fptools_cv_htype_uintmax_t="Word$HTYPE_SIZE"
+            else
+                fptools_cv_htype_uintmax_t="Int$HTYPE_SIZE"
+            fi
+        fi
+
+fi
+
+    if test "$fptools_cv_htype_sup_uintmax_t" = no
+    then
+
+        fptools_cv_htype_uintmax_t=NotReallyAType
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not supported" >&5
+$as_echo "not supported" >&6; }
+
+    fi
+
+            if test "$fptools_cv_htype_sup_uintmax_t" = yes; then
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fptools_cv_htype_uintmax_t" >&5
+$as_echo "$fptools_cv_htype_uintmax_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define HTYPE_UINTMAX_T $fptools_cv_htype_uintmax_t
+_ACEOF
+
+    fi
+
+
+
+# test errno values
+for fp_const_name in E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EADV EAFNOSUPPORT EAGAIN EALREADY EBADF EBADMSG EBADRPC EBUSY ECHILD ECOMM ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK EDESTADDRREQ EDIRTY EDOM EDQUOT EEXIST EFAULT EFBIG EFTYPE EHOSTDOWN EHOSTUNREACH EIDRM EILSEQ EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENONET ENOPROTOOPT ENOSPC ENOSR ENOSTR ENOSYS ENOTBLK ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM EPFNOSUPPORT EPIPE EPROCLIM EPROCUNAVAIL EPROGMISMATCH EPROGUNAVAIL EPROTO EPROTONOSUPPORT EPROTOTYPE ERANGE EREMCHG EREMOTE EROFS ERPCMISMATCH ERREMOTE ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESRMNT ESTALE ETIME ETIMEDOUT ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV ENOCIGAR ENOTSUP
+do
+as_fp_Cache=`$as_echo "fp_cv_const_$fp_const_name" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of $fp_const_name" >&5
+$as_echo_n "checking value of $fp_const_name... " >&6; }
+if eval \${$as_fp_Cache+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "$fp_const_name" "fp_check_const_result"        "#include <stdio.h>
+#include <errno.h>
+"; then :
+
+else
+  fp_check_const_result='-1'
+fi
+
+
+eval "$as_fp_Cache=\$fp_check_const_result"
+fi
+eval ac_res=\$$as_fp_Cache
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define `$as_echo "CONST_$fp_const_name" | $as_tr_cpp` `eval 'as_val=${'$as_fp_Cache'};$as_echo "$as_val"'`
+_ACEOF
+
+done
+
+
+# we need SIGINT in TopHandler.lhs
+for fp_const_name in SIGINT
+do
+as_fp_Cache=`$as_echo "fp_cv_const_$fp_const_name" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of $fp_const_name" >&5
+$as_echo_n "checking value of $fp_const_name... " >&6; }
+if eval \${$as_fp_Cache+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "$fp_const_name" "fp_check_const_result"        "
+#if HAVE_SIGNAL_H
+#include <signal.h>
+#endif
+"; then :
+
+else
+  fp_check_const_result='-1'
+fi
+
+
+eval "$as_fp_Cache=\$fp_check_const_result"
+fi
+eval ac_res=\$$as_fp_Cache
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define `$as_echo "CONST_$fp_const_name" | $as_tr_cpp` `eval 'as_val=${'$as_fp_Cache'};$as_echo "$as_val"'`
+_ACEOF
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking value of O_BINARY" >&5
+$as_echo_n "checking value of O_BINARY... " >&6; }
+if ${fp_cv_const_O_BINARY+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if ac_fn_c_compute_int "$LINENO" "O_BINARY" "fp_check_const_result"        "#include <fcntl.h>
+"; then :
+
+else
+  fp_check_const_result=0
+fi
+
+
+fp_cv_const_O_BINARY=$fp_check_const_result
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $fp_cv_const_O_BINARY" >&5
+$as_echo "$fp_cv_const_O_BINARY" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define CONST_O_BINARY $fp_cv_const_O_BINARY
+_ACEOF
+
+
+# We don't use iconv or libcharset on Windows, but if configure finds
+# them then it can cause problems. So we don't even try looking if
+# we are on Windows.
+# See http://www.haskell.org/pipermail/cvs-ghc/2011-September/065980.html
+if test "$WINDOWS" = "NO"
+then
+
+# We can't just use AC_SEARCH_LIBS for this, as on OpenBSD the iconv.h
+# header needs to be included as iconv_open is #define'd to something
+# else. We therefore use our own FP_SEARCH_LIBS_PROTO, which allows us
+# to give prototype text.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing iconv" >&5
+$as_echo_n "checking for library containing iconv... " >&6; }
+if ${ac_cv_search_iconv+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <stddef.h>
+#include <iconv.h>
+
+int
+main ()
+{
+iconv_t cd;
+                      cd = iconv_open("", "");
+                      iconv(cd,NULL,NULL,NULL,NULL);
+                      iconv_close(cd);
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' iconv; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_iconv=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_iconv+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_iconv+:} false; then :
+
+else
+  ac_cv_search_iconv=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_iconv" >&5
+$as_echo "$ac_cv_search_iconv" >&6; }
+ac_res=$ac_cv_search_iconv
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  EXTRA_LIBS="$EXTRA_LIBS $ac_lib"
+else
+  as_fn_error $? "iconv is required on non-Windows platforms" "$LINENO" 5
+fi
+
+# If possible, we use libcharset instead of nl_langinfo(CODESET) to
+# determine the current locale's character encoding.  Allow the user
+# to disable this with --without-libcharset if they don't want a
+# dependency on libcharset.
+
+# Check whether --with-libcharset was given.
+if test "${with_libcharset+set}" = set; then :
+  withval=$with_libcharset;
+else
+  with_libcharset=check
+fi
+
+
+if test "x$with_libcharset" != xno; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing locale_charset" >&5
+$as_echo_n "checking for library containing locale_charset... " >&6; }
+if ${ac_cv_search_locale_charset+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <libcharset.h>
+int
+main ()
+{
+const char* charset = locale_charset();
+  ;
+  return 0;
+}
+_ACEOF
+for ac_lib in '' charset; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
+  fi
+  if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_search_locale_charset=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext
+  if ${ac_cv_search_locale_charset+:} false; then :
+  break
+fi
+done
+if ${ac_cv_search_locale_charset+:} false; then :
+
+else
+  ac_cv_search_locale_charset=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_locale_charset" >&5
+$as_echo "$ac_cv_search_locale_charset" >&6; }
+ac_res=$ac_cv_search_locale_charset
+if test "$ac_res" != no; then :
+  test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_LIBCHARSET 1" >>confdefs.h
+
+     EXTRA_LIBS="$EXTRA_LIBS $ac_lib"
+
+fi
+fi
+
+fi
+
 ac_fn_c_check_type "$LINENO" "struct MD5Context" "ac_cv_type_struct_MD5Context" "#include \"include/md5.h\"
 "
 if test "x$ac_cv_type_struct_MD5Context" = xyes; then :
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@
 AC_HEADER_STDC
 
 # check for specific header (.h) files that we are interested in
-AC_CHECK_HEADERS([ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.h sys/resource.h sys/select.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/wait.h termios.h time.h unistd.h utime.h windows.h winsock.h langinfo.h poll.h sys/epoll.h sys/event.h sys/eventfd.h])
+AC_CHECK_HEADERS([ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.h sys/resource.h sys/select.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/wait.h termios.h time.h unistd.h utime.h windows.h winsock.h langinfo.h poll.h sys/epoll.h sys/event.h sys/eventfd.h sys/socket.h])
 
 # Enable large file support. Do this before testing the types ino_t, off_t, and
 # rlim_t, because it will affect the result of that test.
@@ -72,6 +72,9 @@
 # Linux open file descriptor locks
 AC_CHECK_DECL([F_OFD_SETLK], [
   AC_DEFINE([HAVE_OFD_LOCKING], [1], [Define if you have open file descriptor lock support.])
+], [], [
+  #include <unistd.h>
+  #include <fcntl.h>
 ])
 
 # flock
@@ -168,6 +171,8 @@
 FPTOOLS_CHECK_HTYPE(id_t)
 FPTOOLS_CHECK_HTYPE(key_t)
 FPTOOLS_CHECK_HTYPE(timer_t)
+FPTOOLS_CHECK_HTYPE(socklen_t)
+FPTOOLS_CHECK_HTYPE(nfds_t)
 
 FPTOOLS_CHECK_HTYPE(intptr_t)
 FPTOOLS_CHECK_HTYPE(uintptr_t)
@@ -233,8 +238,6 @@
 
 fi
 
-# Hack - md5.h needs HsFFI.h.  Is there a better way to do this?
-CFLAGS="-I../.. -I../../../../includes $CFLAGS"
 dnl Calling AC_CHECK_TYPE(T) makes AC_CHECK_SIZEOF(T) abort on failure
 dnl instead of considering sizeof(T) as 0.
 AC_CHECK_TYPE([struct MD5Context], [], [AC_MSG_ERROR([internal error])], [#include "include/md5.h"])
diff --git a/include/HsBaseConfig.h.in b/include/HsBaseConfig.h.in
--- a/include/HsBaseConfig.h.in
+++ b/include/HsBaseConfig.h.in
@@ -417,6 +417,9 @@
 /* Define to 1 if you have the <sys/select.h> header file. */
 #undef HAVE_SYS_SELECT_H
 
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
 /* Define to 1 if you have the <sys/stat.h> header file. */
 #undef HAVE_SYS_STAT_H
 
@@ -540,6 +543,9 @@
 /* Define to Haskell type for mode_t */
 #undef HTYPE_MODE_T
 
+/* Define to Haskell type for nfds_t */
+#undef HTYPE_NFDS_T
+
 /* Define to Haskell type for nlink_t */
 #undef HTYPE_NLINK_T
 
@@ -566,6 +572,9 @@
 
 /* Define to Haskell type for size_t */
 #undef HTYPE_SIZE_T
+
+/* Define to Haskell type for socklen_t */
+#undef HTYPE_SOCKLEN_T
 
 /* Define to Haskell type for speed_t */
 #undef HTYPE_SPEED_T
diff --git a/include/fs.h b/include/fs.h
--- a/include/fs.h
+++ b/include/fs.h
@@ -1,6 +1,6 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) Tamar Christina 2018
+ * (c) Tamar Christina 2018-2019
  *
  * Windows I/O routines for file opening.
  *
@@ -25,11 +25,25 @@
 
 #if defined(_WIN32)
 #include <wchar.h>
-
+wchar_t* FS(create_device_name) (const wchar_t*);
+int FS(translate_mode) (const wchar_t*);
 int FS(swopen) (const wchar_t* filename, int oflag,
                 int shflag, int pmode);
+int FS(sopen) (const char* filename, int oflag,
+               int shflag, int pmode);
 FILE *FS(fwopen) (const wchar_t* filename, const wchar_t* mode);
 FILE *FS(fopen) (const char* filename, const char* mode);
+int FS(_stat) (const char *path, struct _stat *buffer);
+int FS(_stat64) (const char *path, struct __stat64 *buffer);
+int FS(_wstat) (const wchar_t *path, struct _stat *buffer);
+int FS(_wstat64) (const wchar_t *path, struct __stat64 *buffer);
+int FS(_wrename) (const wchar_t *from, const wchar_t *to);
+int FS(rename) (const char *from, const char *to);
+int FS(unlink) (const char *filename);
+int FS(_unlink) (const char *filename);
+int FS(_wunlink) (const wchar_t *filename);
+int FS(remove) (const char *path);
+int FS(_wremove) (const wchar_t *path);
 #else
 
 FILE *FS(fopen) (const char* filename, const char* mode);
diff --git a/include/md5.h b/include/md5.h
--- a/include/md5.h
+++ b/include/md5.h
@@ -1,18 +1,15 @@
 /* MD5 message digest */
 #pragma once
 
-#include "HsFFI.h"
-
-typedef HsWord32 word32;
-typedef HsWord8  byte;
+#include <stdint.h>
 
 struct MD5Context {
-	word32 buf[4];
-	word32 bytes[2];
-	word32 in[16];
+	uint32_t buf[4];
+	uint32_t bytes[2];
+	uint32_t in[16];
 };
 
 void __hsbase_MD5Init(struct MD5Context *context);
-void __hsbase_MD5Update(struct MD5Context *context, byte const *buf, int len);
-void __hsbase_MD5Final(byte digest[16], struct MD5Context *context);
-void __hsbase_MD5Transform(word32 buf[4], word32 const in[16]);
+void __hsbase_MD5Update(struct MD5Context *context, uint8_t const *buf, int len);
+void __hsbase_MD5Final(uint8_t digest[16], struct MD5Context *context);
+void __hsbase_MD5Transform(uint32_t buf[4], uint32_t const in[16]);
