configure.in | 21 ++++++++++++++++++--- 1 files changed, 18 insertions(+), 3 deletions(-) diff --git a/configure.in b/configure.in index 1908249..bf5d129 100644 --- a/configure.in +++ b/configure.in @@ -194,10 +194,24 @@ AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required])) dnl ==================================== dnl = lzmadec for help converters dnl ==================================== + +AC_ARG_ENABLE([lzma], + AC_HELP_STRING([--enable-lzma], + [Enable lzma support @<:@default=yes@:>@]), + enable_lzma=$enableval, enable_lzma=yes) + LZMADEC_LIBS= -AC_CHECK_LIB(lzmadec, lzmadec_open, [LZMADEC_LIBS=-llzmadec - AC_DEFINE(HAVE_LIBLZMADEC, 1, [Compile with liblzmadec support])]) -AC_SUBST(LZMADEC_LIBS) +if test x$enable_lzma = xyes; then + AC_CHECK_LIB(lzmadec, lzmadec_open, + [LZMADEC_LIBS=-llzmadec + AC_DEFINE(HAVE_LIBLZMADEC, 1, [Compile with liblzmadec support])]) + + if test x$LZMADEC_LIBS != x-llzmadec; then + enable_lzma=no + fi + + AC_SUBST(LZMADEC_LIBS) +fi dnl ==================================== dnl = Bzip2, for the help converters @@ -289,6 +303,7 @@ yelp-$VERSION: compiler: ${CC} Debug enabled: ${enable_debug} + lzma enabled: ${enable_lzma} Search backend: ${search_backend} Mozilla version: ${MOZILLA} "