summaryrefslogtreecommitdiff
blob: 1ace314d200282cba776702f39fb32ef04f8efff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
 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}
 "