1 May 2008 01:05
Re: [darcs-devel] darcs patch: Use GHC instead of GCC to check for zlib availability ...
David Roundy <droundy <at> darcs.net>
2008-04-30 23:05:52 GMT
2008-04-30 23:05:52 GMT
On Thu, May 01, 2008 at 12:02:08AM +0200, Reinier Lamers wrote:
> Thu May 1 00:01:05 CEST 2008 tux_rocker <at> reinier.de
> * Use GHC instead of GCC to check for zlib availability (issue 813)
This looks like a nice attempt, but I'd like to see an even nicer
version that defines an autoconf macro to do this sort of test...
Content-Description: A darcs patch for your repository!
>
> New patches:
>
> [Use GHC instead of GCC to check for zlib availability (issue 813)
> tux_rocker <at> reinier.de**20080430220105] hunk ./configure.ac 410
> +dnl look for zlib library and header.
> +dnl Use TRY_COMPILE_GHC and not AC_CHECK_HEADER / AC_CHECK_LIB because GHC may
> +dnl use a different library and header than the system GCC (on Windows, issue 813)
> +
> +OLDGHCFLAGS="$GHCFLAGS"
> +dnl Force compilation via C to detect missing headers
> +GHCFLAGS="$GHCFLAGS -lz -fvia-C"
> +AC_MSG_CHECKING([for zlib])
> +TRY_COMPILE_GHC([{-# INCLUDE <zlib.h> #-}
> +{-# OPTIONS_GHC -fglasgow-exts #-}
> +module Main where
> +import Foreign
> +import Foreign.C
> +import Foreign.Ptr
> +
> +foreign import ccall unsafe "zlib.h deflate" zlib_deflate :: Ptr () -> CInt -> CInt
(Continue reading)
RSS Feed