4 dnl Check configure options and assign variables related to
12 AC_ARG_WITH(zlib,AS_HELP_STRING([--with-zlib=PREFIX],
13 [zlib compression library]),
15 if test "$withval" = "yes" ; then
16 AC_MSG_ERROR([--with-zlib requires an argument.])
18 AC_MSG_NOTICE([zlib library configuration])
20 save_cppflags="$CPPFLAGS"
21 CPPFLAGS="$CPPFLAGS -I$zlib_prefix/include"
22 AC_CHECK_HEADERS(zlib.h,[
23 save_ldflags="$LDFLAGS"
24 LDFLAGS="-L$zlib_prefix/lib"
25 AC_CHECK_LIB(z, inflate, [zlib_found="yes"])
26 LDFLAGS="$save_ldflags"
28 CPPFLAGS="$save_cppflags"
32 AC_CHECK_HEADER(zlib.h, [
33 AC_CHECK_LIB(z, inflate, [zlib_found="builtin"])
37 if test "$zlib_found" = "no"; then
38 AC_MSG_ERROR([subversion requires zlib])
41 if test "$zlib_found" = "yes"; then
42 SVN_ZLIB_PREFIX="$zlib_prefix"
43 SVN_ZLIB_INCLUDES="-I$zlib_prefix/include"
44 LDFLAGS="-L$zlib_prefix/lib"
49 AC_SUBST(SVN_ZLIB_PREFIX)
50 AC_SUBST(SVN_ZLIB_INCLUDES)
51 AC_SUBST(SVN_ZLIB_LIBS)