From: Guus Sliepen Date: Wed, 29 Nov 2006 17:18:39 +0000 (+0000) Subject: Search for lzo/lzo1x.h, lzo2/lzo1x.h and lzo1x.h. X-Git-Tag: release-1.0.6~11 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=47d916ec5eb61fa396c0ec6962afed7885141478;p=oweals%2Ftinc.git Search for lzo/lzo1x.h, lzo2/lzo1x.h and lzo1x.h. --- diff --git a/m4/lzo.m4 b/m4/lzo.m4 index 2697d6f..a996b1d 100644 --- a/m4/lzo.m4 +++ b/m4/lzo.m4 @@ -22,16 +22,21 @@ AC_DEFUN([tinc_LZO], ) 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] - )], + [LIBS="$LIBS -llzo2"], [AC_CHECK_LIB(lzo, lzo1x_1_compress, - [AC_CHECK_HEADERS(lzo1x.h, - [LIBS="$LIBS -llzo"], - [AC_MSG_ERROR("lzo1 header files not found."); break] - )], + [LIBS="$LIBS -llzo"], [AC_MSG_ERROR("lzo libraries not found."); break] )] ) + + 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] + )] + )] + ) ]) diff --git a/src/net_packet.c b/src/net_packet.c index 20bee34..105cafb 100644 --- a/src/net_packet.c +++ b/src/net_packet.c @@ -29,12 +29,7 @@ #include #include -#ifdef HAVE_LZO_LZO1X_H -#include -#endif -#ifdef HAVE_LZO1X_H -#include -#endif +#include LZO1X_H #include "avl_tree.h" #include "conf.h" diff --git a/src/tincd.c b/src/tincd.c index 7619af5..b6a24da 100644 --- a/src/tincd.c +++ b/src/tincd.c @@ -37,12 +37,7 @@ #include #include -#ifdef HAVE_LZO_LZO1X_H -#include -#endif -#ifdef HAVE_LZO1X_H -#include -#endif +#include LZO1X_H #include #include "pidfile.h"