Search for lzo/lzo1x.h, lzo2/lzo1x.h and lzo1x.h.

This commit is contained in:
Guus Sliepen 2006-11-29 17:18:39 +00:00
parent 1bb5a284fe
commit 47d916ec5e
3 changed files with 15 additions and 20 deletions

View file

@ -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, [<lzo/lzo1x.h>], [Location of lzo1x.h])],
[AC_CHECK_HEADERS(lzo2/lzo1x.h,
[AC_DEFINE(LZO1X_H, [<lzo2/lzo1x.h>], [Location of lzo1x.h])],
[AC_CHECK_HEADERS(lzo1x.h,
[AC_DEFINE(LZO1X_H, [<lzo1x.h>], [Location of lzo1x.h])],
[AC_MSG_ERROR("lzo header files not found."); break]
)]
)]
)
])

View file

@ -29,12 +29,7 @@
#include <openssl/hmac.h>
#include <zlib.h>
#ifdef HAVE_LZO_LZO1X_H
#include <lzo/lzo1x.h>
#endif
#ifdef HAVE_LZO1X_H
#include <lzo1x.h>
#endif
#include LZO1X_H
#include "avl_tree.h"
#include "conf.h"

View file

@ -37,12 +37,7 @@
#include <openssl/evp.h>
#include <openssl/engine.h>
#ifdef HAVE_LZO_LZO1X_H
#include <lzo/lzo1x.h>
#endif
#ifdef HAVE_LZO1X_H
#include <lzo1x.h>
#endif
#include LZO1X_H
#include <getopt.h>
#include "pidfile.h"