1 dnl Check to find the zlib headers/libraries
5 tinc_ac_save_CPPFLAGS="$CPPFLAGS"
8 AC_HELP_STRING([--with-zlib=DIR], [zlib base directory, or:]),
10 CFLAGS="$CFLAGS -I$withval/include"
11 CPPFLAGS="$CPPFLAGS -I$withval/include"
12 LIBS="$LIBS -L$withval/lib"]
15 AC_ARG_WITH(zlib-include,
16 AC_HELP_STRING([--with-zlib-include=DIR], [zlib headers directory]),
17 [zlib_include="$withval"
18 CFLAGS="$CFLAGS -I$withval"
19 CPPFLAGS="$CPPFLAGS -I$withval"]
23 AC_HELP_STRING([--with-zlib-lib=DIR], [zlib library directory]),
25 LIBS="$LIBS -L$withval"]
28 AC_CHECK_HEADERS(zlib.h,
30 [AC_MSG_ERROR("zlib header files not found."); break]
33 CPPFLAGS="$tinc_ac_save_CPPFLAGS"
35 AC_CHECK_LIB(z, compress2,
37 [AC_MSG_ERROR("zlib libraries not found.")]