From bdb3c24cea06e9557738b42e3c37cd036613b58d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 11 Nov 2006 20:06:14 +0000 Subject: [PATCH] Support and autodetect LZO version 2.0 and later. --- m4/lzo.m4 | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/m4/lzo.m4 b/m4/lzo.m4 index 8214d4c2..2697d6f0 100644 --- a/m4/lzo.m4 +++ b/m4/lzo.m4 @@ -21,13 +21,17 @@ AC_DEFUN([tinc_LZO], LDFLAGS="$LDFLAGS -L$withval"] ) - AC_CHECK_HEADERS(lzo1x.h, - [], - [AC_MSG_ERROR("lzo header files not found."); break] - ) - - AC_CHECK_LIB(lzo, lzo1x_1_compress, - [LIBS="$LIBS -llzo"], - [AC_MSG_ERROR("lzo libraries not found.")] + AC_CHECK_LIB(lzo2, lzo1x_1_compress, + [AC_CHECK_HEADERS(lzo/lzo1x.h, + [LIBS="$LIBS -llzo2"], + [AC_MSG_ERROR("lzo2 header files not found."); break] + )], + [AC_CHECK_LIB(lzo, lzo1x_1_compress, + [AC_CHECK_HEADERS(lzo1x.h, + [LIBS="$LIBS -llzo"], + [AC_MSG_ERROR("lzo1 header files not found."); break] + )], + [AC_MSG_ERROR("lzo libraries not found."); break] + )] ) ]) -- 2.39.5