2002-02-11 15:59:18 +00:00
|
|
|
dnl Check to find the zlib headers/libraries
|
|
|
|
|
|
|
|
AC_DEFUN(tinc_ZLIB,
|
|
|
|
[
|
|
|
|
tinc_ac_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
|
|
|
|
AC_ARG_WITH(zlib-include,
|
2002-03-27 19:43:50 +00:00
|
|
|
[ --with-zlib-include=DIR zlib headers directory],
|
2002-02-11 15:59:18 +00:00
|
|
|
[zlib_include="$withval"
|
|
|
|
CFLAGS="$CFLAGS -I$withval"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$withval"]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_ARG_WITH(zlib-lib,
|
2002-03-27 19:43:50 +00:00
|
|
|
[ --with-zlib-lib=DIR zlib library directory],
|
2002-02-11 15:59:18 +00:00
|
|
|
[zlib_lib="$withval"
|
|
|
|
LIBS="$LIBS -L$withval"]
|
|
|
|
)
|
|
|
|
|
|
|
|
AC_CHECK_HEADERS(zlib.h,
|
|
|
|
[],
|
|
|
|
[AC_MSG_ERROR("zlib header files not found."); break]
|
|
|
|
)
|
|
|
|
|
|
|
|
CPPFLAGS="$tinc_ac_save_CPPFLAGS"
|
|
|
|
|
|
|
|
AC_CHECK_LIB(z, compress2,
|
|
|
|
[LIBS="$LIBS -lz"],
|
|
|
|
[AC_MSG_ERROR("zlib libraries not found.")]
|
|
|
|
)
|
|
|
|
])
|