curl-users
Re: Compilation error from `urldata.h'
Date: Fri, 4 Oct 2002 09:25:42 +0200 (MET DST)
On Thu, 3 Oct 2002, Albert Chin wrote:
> Ok, new patch that actually works!
I could not get that to work either. However, I used your version as input
and mixed in my fixes and I got this result (showing the zlib section only).
Differences:
o Checks /usr/local by default (if not found without it)
o Sets the LIBS to include -lz properly
o Define HAVE_ZLIB_H
o Uses SUBST() properly (for the curl-config.in stuff)
dnl **********************************************************************
dnl Check for the presence of ZLIB libraries and headers
dnl **********************************************************************
dnl Check for & handle argument to --with-zlib.
_cppflags=$CPPFLAGS
_ldflags=$LDFLAGS
OPT_ZLIB="/usr/local"
AC_ARG_WITH(zlib,
AC_HELP_STRING([--with-zlib=PATH], [search for zlib in PATH])
AC_HELP_STRING([--without-zlib], [disable use of zlib]),
[OPT_ZLIB="$withval"])
case "$OPT_ZLIB" in
no)
AC_MSG_WARN([zlib disabled]) ;;
*)
dnl check for the lib first without setting any new path, since many
dnl people have it in the default path
AC_CHECK_LIB(z, inflateEnd, ,
[if test -d "$OPT_ZLIB"; then
CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib"
fi])
AC_CHECK_HEADER(zlib.h,[
AC_CHECK_LIB(z, gzread,
[AM_CONDITIONAL(CONTENT_ENCODING, true)
HAVE_LIBZ="1"
AC_SUBST(HAVE_LIBZ)
LIBS="$LIBS -lz"
AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header
file])
AC_DEFINE(HAVE_LIBZ, 1, [If zlib is available])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags])],
[ CPPFLAGS=$_cppflags
LDFLAGS=$_ldflags]
)
;;
esac
-- Daniel Stenberg -- curl related mails on curl related mailing lists please ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2002-10-04