1 dnl Check to find the lzo headers/libraries
6 AS_HELP_STRING([--with-lzo=DIR], [lzo base directory, or:]),
8 CPPFLAGS="$CPPFLAGS -I$withval/include"
9 LDFLAGS="$LDFLAGS -L$withval/lib"]
12 AC_ARG_WITH(lzo-include,
13 AS_HELP_STRING([--with-lzo-include=DIR], [lzo headers directory]),
14 [lzo_include="$withval"
15 CPPFLAGS="$CPPFLAGS -I$withval"]
19 AS_HELP_STRING([--with-lzo-lib=DIR], [lzo library directory]),
21 LDFLAGS="$LDFLAGS -L$withval"]
24 AC_CHECK_LIB(lzo2, lzo1x_1_compress,
25 [LIBS="$LIBS -llzo2"],
26 [AC_CHECK_LIB(lzo, lzo1x_1_compress,
28 [AC_MSG_ERROR("lzo libraries not found."); break]
32 AC_CHECK_HEADERS(lzo/lzo1x.h,
33 [AC_DEFINE(LZO1X_H, [<lzo/lzo1x.h>], [Location of lzo1x.h])],
34 [AC_CHECK_HEADERS(lzo2/lzo1x.h,
35 [AC_DEFINE(LZO1X_H, [<lzo2/lzo1x.h>], [Location of lzo1x.h])],
36 [AC_CHECK_HEADERS(lzo1x.h,
37 [AC_DEFINE(LZO1X_H, [<lzo1x.h>], [Location of lzo1x.h])],
38 [AC_MSG_ERROR("lzo header files not found."); break]