]> git.meshlink.io Git - meshlink/blob - m4/lzo.m4
Update configure scripts.
[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,
8     AC_HELP_STRING([--with-lzo=DIR], [lzo base directory, or:]),
9     [lzo="$withval"
10      CFLAGS="$CFLAGS -I$withval/include"
11      CPPFLAGS="$CPPFLAGS -I$withval/include"
12      LIBS="$LIBS -L$withval/lib"]
13   )
14
15   AC_ARG_WITH(lzo-include,
16     AC_HELP_STRING([--with-lzo-include=DIR], [lzo headers directory]),
17     [lzo_include="$withval"
18      CFLAGS="$CFLAGS -I$withval"
19      CPPFLAGS="$CPPFLAGS -I$withval"]
20   )
21
22   AC_ARG_WITH(lzo-lib,
23     AC_HELP_STRING([--with-lzo-lib=DIR], [lzo library directory]),
24     [lzo_lib="$withval"
25      LIBS="$LIBS -L$withval"]
26   )
27
28   AC_CHECK_HEADERS(lzo1x.h,
29     [],
30     [AC_MSG_ERROR("lzo header files not found."); break]
31   )
32
33   CPPFLAGS="$tinc_ac_save_CPPFLAGS"
34
35   AC_CHECK_LIB(lzo, lzo1x_1_compress,
36     [LIBS="$LIBS -llzo"],
37     [AC_MSG_ERROR("lzo libraries not found.")]
38   )
39 ])