]> git.meshlink.io Git - meshlink/blob - m4/lzo.m4
Fix warning and add missing checks for LZO library.
[meshlink] / m4 / lzo.m4
1 dnl Check to find the lzo headers/libraries
2
3 AC_DEFUN(tinc_LZO,
4 [
5   tinc_ac_save_CPPFLAGS="$CPPFLAGS"
6
7   AC_ARG_WITH(lzo-include,
8     [  --with-lzo-include=DIR lzo headers directory],
9     [lzo_include="$withval"
10      CFLAGS="$CFLAGS -I$withval"
11      CPPFLAGS="$CPPFLAGS -I$withval"]
12   )
13
14   AC_ARG_WITH(lzo-lib,
15     [  --with-lzo-lib=DIR     lzo library directory],
16     [lzo_lib="$withval"
17      LIBS="$LIBS -L$withval"]
18   )
19
20   AC_CHECK_HEADERS(lzo1x.h,
21     [],
22     [AC_MSG_ERROR("lzo header files not found."); break]
23   )
24
25   CPPFLAGS="$tinc_ac_save_CPPFLAGS"
26
27   AC_CHECK_LIB(lzo, lzo1x_1_compress,
28     [LIBS="$LIBS -llzo"],
29     [AC_MSG_ERROR("lzo libraries not found.")]
30   )
31 ])