summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-06 11:00:49 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-06 11:00:49 +0200
commitcbcf86dde27767682483985e42f7ca49e1d3a208 (patch)
tree6abb8eabcda6e6aa64184aa24fb8c501f7c841b9 /configure.ac
parenta5f604469d5cde8cb654e209f1ec30bf8e44b51e (diff)
Add LZO compressor implementation
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 4cb29bd..422a113 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,13 +61,25 @@ AC_ARG_WITH([xz],
esac],
[AM_CONDITIONAL([WITH_XZ], [true])])
+AC_ARG_WITH([lzo],
+ [AS_HELP_STRING([--without-lzo],
+ [Build without lzo compression support])],
+ [case "${withval}" in
+ yes) AM_CONDITIONAL([WITH_LZO], [true]) ;;
+ no) AM_CONDITIONAL([WITH_LZO], [false]) ;;
+ *) AC_MSG_ERROR([bad value ${withval} for --without-lzo]) ;;
+ esac],
+ [AM_CONDITIONAL([WITH_LZO], [true])])
+
##### search for dependencies #####
need_zlib="no"
need_xz="no"
+need_lzo="no"
AM_COND_IF([WITH_GZIP], [need_zlib="yes"])
AM_COND_IF([WITH_XZ], [need_xz="yes"])
+AM_COND_IF([WITH_LZO], [need_lzo="yes"])
if test "x$need_zlib" = "xyes"; then
PKG_CHECK_MODULES(ZLIB, [zlib], [], [AC_MSG_ERROR([cannot find zlib])])
@@ -78,6 +90,16 @@ if test "x$need_xz" = "xyes"; then
[AC_MSG_ERROR([cannot find xz sdk])])
fi
+if test "x$need_lzo" = "xyes"; then
+ AC_ARG_VAR([LZO_CFLAGS], [C compiler flags for lzo])
+ AC_ARG_VAR([LZO_LIBS], [linker flags for lzo])
+ AC_CHECK_LIB([lzo2], [lzo1x_1_15_compress], [LZO_LIBS="-llzo2"],
+ [AC_CHECK_LIB([lzo],[lzo1x_1_15_compress],[LZO_LIBS="-llzo"],
+ [AC_MSG_ERROR([cannot find lzo library])]
+ )]
+ )
+fi
+
##### generate output #####
AC_CONFIG_HEADERS([config.h])