[yelp] [configure.in] Updating and fixing bits of lzma building, --disable-lzma works
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] [configure.in] Updating and fixing bits of lzma building, --disable-lzma works
- Date: Thu, 6 May 2010 20:33:06 +0000 (UTC)
commit e546849e2ac89f61cd72f4139f1f0d11482d69b5
Author: Shaun McCance <shaunm gnome org>
Date: Thu May 6 15:32:29 2010 -0500
[configure.in] Updating and fixing bits of lzma building, --disable-lzma works
configure.in | 88 ++++++++++---------------------------
libyelp/Makefile.am | 27 +++++++-----
libyelp/yelp-magic-decompressor.c | 9 +++-
src/Makefile.am | 2 -
4 files changed, 47 insertions(+), 79 deletions(-)
---
diff --git a/configure.in b/configure.in
index 0139f76..8140a41 100644
--- a/configure.in
+++ b/configure.in
@@ -7,7 +7,6 @@ AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([1.9 dist-bzip2 no-dist-gzip])
AM_MAINTAINER_MODE
-
AC_PROG_LN_S
AC_PROG_CC
AM_PROG_CC_STDC
@@ -45,7 +44,6 @@ AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",
[The gettext translation domain])
AM_GLIB_GNU_GETTEXT
-
AM_GLIB_DEFINE_LOCALEDIR([GNOMELOCALEDIR])
PKG_CHECK_MODULES(YELP,
@@ -62,6 +60,28 @@ PKG_CHECK_MODULES(YELP,
yelp-xsl
])
+AC_ARG_ENABLE(lzma,
+ AS_HELP_STRING([--enable-lzma],[Enable lzma decoder support [[default=yes]]]),
+ [enable_lzma=$enableval],
+ [enable_lzma="auto"])
+if test x"$enable_lzma" = "xauto"; then
+ PKG_CHECK_MODULES(YELP_LZMA,
+ liblzma,
+ enable_lzma=yes,
+ enable_lzma=no)
+elif test x"$enable_lzma" = "xyes"; then
+ PKG_CHECK_MODULES(YELP_LZMA, liblzma)
+fi
+if test x"$enable_lzma" = "xyes"; then
+ YELP_CFLAGS="$YELP_LZMA_CFLAGS $YELP_CFLAGS";
+ YELP_LIBS="$YELP_LZMA_LIBS $YELP_LIBS";
+ AC_DEFINE(ENABLE_LZMA, 1, [Enable lzma decoder support])
+fi
+AM_CONDITIONAL([ENABLE_LZMA],[test x"$enable_lzma" != "xno"])
+
+AC_SUBST([YELP_CFLAGS])
+AC_SUBST([YELP_LIBS])
+
DATADIR=`(
case $prefix in
NONE) prefix=$ac_default_prefix ;;
@@ -71,9 +91,6 @@ DATADIR=`(
)`
AC_SUBST([DATADIR])
-AC_SUBST([YELP_CFLAGS])
-AC_SUBST([YELP_LIBS])
-
AC_PATH_PROGS(SED, gsed sed)
GLIB_GSETTINGS
@@ -134,58 +151,6 @@ fi
AC_SUBST(X_LIBS)
-
-dnl ******
-dnl beagle
-dnl ******
-
-BEAGLE_MODULES=
-if $PKG_CONFIG --exists libbeagle-1.0; then
- BEAGLE_MODULES="libbeagle-1.0 >= 0.3.0"
-else
- BEAGLE_MODULES="libbeagle-0.0 >= 0.2.4"
-fi
-
-AC_ARG_WITH([search],
- [AC_HELP_STRING([--with-search=basic|beagle|auto],
- [turn on search support [default=auto]])], ,
- with_search=auto)
-
-if test "x$with_search" = "xauto"; then
- PKG_CHECK_MODULES(YELP_SEARCH, $BEAGLE_MODULES, have_beagle=yes, have_beagle=no)
-fi
-
-AM_CONDITIONAL(ENABLE_BEAGLE, test x"$with_search" = xbeagle)
-
-if test "x$with_search" = "xbeagle"; then
- PKG_CHECK_MODULES(YELP_SEARCH, $BEAGLE_MODULES)
-fi
-
-
-case "x$with_search" in
- "xbasic")
- search_backend="basic"
- ;;
- "xbeagle")
- search_backend="beagle"
- AC_DEFINE(ENABLE_BEAGLE, 1, [Define if you want the power of Beagle])
- ;;
- "xauto")
- search_backend="auto - basic"
- if test x$have_beagle = xyes; then
- AC_DEFINE(ENABLE_BEAGLE, 1)
- search_backend="auto - beagle"
- fi
- ;;
- *)
- AC_MSG_ERROR([Unknown search type selected - Please use --with-search=auto|basic|beagle])
- ;;
-esac
-
-AC_SUBST([YELP_SEARCH_CFLAGS])
-AC_SUBST([YELP_SEARCH_LIBS])
-
-
dnl ====================================
dnl = zlib for help converters
dnl ====================================
@@ -193,14 +158,6 @@ AC_CHECK_LIB(z, gzopen, [Z_LIBS=-lz
AC_SUBST(Z_LIBS)], AC_MSG_ERROR([*** zlib is required]))
dnl ====================================
-dnl = lzmadec for help converters
-dnl ====================================
-LZMADEC_LIBS=
-AC_CHECK_LIB(lzmadec, lzmadec_open, [LZMADEC_LIBS=-llzmadec
- AC_DEFINE(HAVE_LIBLZMADEC, 1, [Compile with liblzmadec support])])
-AC_SUBST(LZMADEC_LIBS)
-
-dnl ====================================
dnl = Bzip2, for the help converters
dnl ====================================
BZ_LIBS=
@@ -300,5 +257,6 @@ yelp-$VERSION:
Debug enabled: ${enable_debug}
Search backend: ${search_backend}
Using SMClient: ${with_smclient}
+ Enable LZMA: ${enable_lzma}
"
diff --git a/libyelp/Makefile.am b/libyelp/Makefile.am
index 880b94b..36e0448 100644
--- a/libyelp/Makefile.am
+++ b/libyelp/Makefile.am
@@ -10,7 +10,6 @@ libyelp_la_SOURCES = \
yelp-info-parser.c \
yelp-io-channel.c \
yelp-location-entry.c \
- yelp-lzma-decompressor.c \
yelp-magic-decompressor.c \
yelp-mallard-document.c \
yelp-marshal.c \
@@ -21,6 +20,22 @@ libyelp_la_SOURCES = \
yelp-types.c \
yelp-view.c
+EXTRA_DIST = \
+ yelp-bz2-decompressor.h \
+ yelp-debug.h \
+ yelp-error.h \
+ yelp-info-parser.h \
+ yelp-io-channel.h \
+ yelp-lzma-decompressor.h \
+ yelp-magic-decompressor.h \
+ yelp-marshal.list
+
+if ENABLE_LZMA
+libyelp_la_SOURCES += yelp-lzma-decompressor.c
+else
+EXTRA_DIST += yelp-lzma-decompressor.c
+endif
+
libyelp_la_CFLAGS = \
$(YELP_CFLAGS) \
-DDATADIR=\""$(datadir)"\" \
@@ -54,16 +69,6 @@ BUILT_SOURCES = \
yelp-types.c \
yelp-types.h
-EXTRA_DIST = \
- yelp-bz2-decompressor.h \
- yelp-debug.h \
- yelp-error.h \
- yelp-info-parser.h \
- yelp-io-channel.h \
- yelp-lzma-decompressor.h \
- yelp-magic-decompressor.h \
- yelp-marshal.list
-
yelp-marshal.h: stamp-yelp-marshal.h
@true
diff --git a/libyelp/yelp-magic-decompressor.c b/libyelp/yelp-magic-decompressor.c
index f1bf5a0..7cf0704 100644
--- a/libyelp/yelp-magic-decompressor.c
+++ b/libyelp/yelp-magic-decompressor.c
@@ -25,9 +25,14 @@
#include <glib/gi18n.h>
+#include "yelp-magic-decompressor.h"
+
#include "yelp-bz2-decompressor.h"
+
+#ifdef ENABLE_LZMA
#include "yelp-lzma-decompressor.h"
-#include "yelp-magic-decompressor.h"
+#endif
+
static void yelp_magic_decompressor_iface_init (GConverterIface *iface);
@@ -122,10 +127,12 @@ yelp_magic_decompressor_convert (GConverter *converter,
((gchar *) inbuf)[1] == 'Z') {
decompressor->magic_decoder_ring = (GConverter *) yelp_bz2_decompressor_new ();
}
+#ifdef ENABLE_LZMA
else if (((gchar *) inbuf)[0] == ']' &&
((gchar *) inbuf)[1] == '\0') {
decompressor->magic_decoder_ring = (GConverter *) yelp_lzma_decompressor_new ();
}
+#endif
else {
decompressor->magic_decoder_ring =
(GConverter *) g_zlib_decompressor_new (G_ZLIB_COMPRESSOR_FORMAT_GZIP);
diff --git a/src/Makefile.am b/src/Makefile.am
index d4c8d71..5775595 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -28,14 +28,12 @@ YELP_DEFINES = \
yelp_CFLAGS = \
-I$(top_srcdir)/libyelp \
$(YELP_CFLAGS) \
- $(YELP_SEARCH_CFLAGS) \
$(AM_CFLAGS) \
$(YELP_DEFINES)
yelp_LDADD = \
$(top_builddir)/libyelp/libyelp.la \
$(YELP_LIBS) \
- $(YELP_SEARCH_LIBS) \
$(POPT_LIBS) \
$(Z_LIBS) \
$(BZ_LIBS) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]