Use CPPFLAGS, LDFLAGS and LIBS as appropiate.
This commit is contained in:
parent
6350334aa4
commit
e898b930dc
3 changed files with 6 additions and 24 deletions
10
m4/zlib.m4
10
m4/zlib.m4
|
@ -2,27 +2,23 @@ dnl Check to find the zlib headers/libraries
|
|||
|
||||
AC_DEFUN(tinc_ZLIB,
|
||||
[
|
||||
tinc_ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
AC_ARG_WITH(zlib,
|
||||
AC_HELP_STRING([--with-zlib=DIR], [zlib base directory, or:]),
|
||||
[zlib="$withval"
|
||||
CFLAGS="$CFLAGS -I$withval/include"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval/include"
|
||||
LIBS="$LIBS -L$withval/lib"]
|
||||
LDFLAGS="$LDFLAGS -L$withval/lib"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(zlib-include,
|
||||
AC_HELP_STRING([--with-zlib-include=DIR], [zlib headers directory]),
|
||||
[zlib_include="$withval"
|
||||
CFLAGS="$CFLAGS -I$withval"
|
||||
CPPFLAGS="$CPPFLAGS -I$withval"]
|
||||
)
|
||||
|
||||
AC_ARG_WITH(zlib-lib,
|
||||
AC_HELP_STRING([--with-zlib-lib=DIR], [zlib library directory]),
|
||||
[zlib_lib="$withval"
|
||||
LIBS="$LIBS -L$withval"]
|
||||
LDFLAGS="$LDFLAGS -L$withval"]
|
||||
)
|
||||
|
||||
AC_CHECK_HEADERS(zlib.h,
|
||||
|
@ -30,8 +26,6 @@ AC_DEFUN(tinc_ZLIB,
|
|||
[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.")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue