X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=m4%2Flzo.m4;h=a996b1d09bccac82542af92751c27fc5b26273f0;hp=8214d4c2d36edfe7e364ba62fe0f548bd3f21a49;hb=d4f9863635d06665cfbd3c46dc482344de240e97;hpb=42e01abd54bd36ee84a45a2b646cfa27034de8d1 diff --git a/m4/lzo.m4 b/m4/lzo.m4 index 8214d4c2..a996b1d0 100644 --- a/m4/lzo.m4 +++ b/m4/lzo.m4 @@ -21,13 +21,22 @@ 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(lzo2, lzo1x_1_compress, + [LIBS="$LIBS -llzo2"], + [AC_CHECK_LIB(lzo, lzo1x_1_compress, + [LIBS="$LIBS -llzo"], + [AC_MSG_ERROR("lzo libraries not found."); break] + )] ) - AC_CHECK_LIB(lzo, lzo1x_1_compress, - [LIBS="$LIBS -llzo"], - [AC_MSG_ERROR("lzo libraries not found.")] + AC_CHECK_HEADERS(lzo/lzo1x.h, + [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], + [AC_CHECK_HEADERS(lzo2/lzo1x.h, + [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], + [AC_CHECK_HEADERS(lzo1x.h, + [AC_DEFINE(LZO1X_H, [], [Location of lzo1x.h])], + [AC_MSG_ERROR("lzo header files not found."); break] + )] + )] ) ])