[pdfmod] Autodetect external poppler-sharp
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pdfmod] Autodetect external poppler-sharp
- Date: Wed, 16 Jun 2010 23:03:35 +0000 (UTC)
commit fb1a0d7bf4a2db47748671243458c6bef4ccaf6d
Author: Chow Loong Jin <hyperair ubuntu com>
Date: Wed Jun 16 23:16:33 2010 +0800
Autodetect external poppler-sharp
Now that poppler-sharp has had a tarball release, detect the system's
poppler-sharp installation if present, and use it accordingly. Also
provide an option --(enable|disable)-external-poppler-sharp which can
override the automagic.
Signed-off-by: Gabriel Burt <gabriel burt gmail com>
configure.ac | 24 +++++++++++++++++++++++-
lib/poppler-sharp/Makefile.am | 5 ++++-
2 files changed, 27 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 80927ea..cd522a6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -123,7 +123,29 @@ HYENA_GUI_FILES="`$PKG_CONFIG --variable=Files hyena.gui`"
AC_SUBST(HYENA_GUI_ASSEMBLIES)
AC_SUBST(HYENA_GUI_FILES)
-BUNDLE_ASSEMBLIES="$HYENA_ASSEMBLIES $HYENA_GUI_ASSEMBLIES"
+dnl choose between bundled or system poppler-sharp
+AC_ARG_ENABLE([external-poppler-sharp],
+ AC_HELP_STRING([--enable-external-poppler-sharp],
+ [Enable using the external poppler-sharp. [[default=auto]]]),,
+ enable_external_poppler_sharp=auto)
+
+if test "$enable_external_poppler_sharp" = "auto"; then
+ PKG_CHECK_MODULES(POPPLER, poppler-sharp,
+ enable_external_poppler_sharp=yes,
+ enable_external_poppler_sharp=no)
+elif test "$enable_external_poppler_sharp" = "yes"; then
+ PKG_CHECK_MODULES(POPPLER, poppler-sharp)
+fi
+
+if test "$enable_external_poppler_sharp" = "yes"; then
+ POPPLER_ASSEMBLIES="`$PKG_CONFIG --variable=Libraries poppler-sharp`"
+ AC_SUBST(POPPLER_ASSEMBLIES)
+fi
+
+AM_CONDITIONAL(USE_BUNDLED_POPPLER,
+ test "$enable_external_poppler_sharp" = "no")
+
+BUNDLE_ASSEMBLIES="$HYENA_ASSEMBLIES $HYENA_GUI_ASSEMBLIES $POPPLER_ASSEMBLIES"
BUNDLE_FILES="$HYENA_FILES $HYENA_GUI_FILES"
AC_SUBST(BUNDLE_ASSEMBLIES)
AC_SUBST(BUNDLE_FILES)
diff --git a/lib/poppler-sharp/Makefile.am b/lib/poppler-sharp/Makefile.am
index 0399b48..3c84cd8 100644
--- a/lib/poppler-sharp/Makefile.am
+++ b/lib/poppler-sharp/Makefile.am
@@ -1,6 +1,7 @@
EXTRA_DIST =
+if USE_BUNDLED_POPPLER
if ENABLE_DEBUG
ASSEMBLY_COMPILER_COMMAND = $(MCS)
ASSEMBLY_COMPILER_FLAGS = -noconfig -codepage:utf8 -warn:4 -optimize+ -unsafe -debug "-define:DEBUG"
@@ -31,7 +32,9 @@ BINARIES =
RESGEN=resgen2
-all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
+all: $(ASSEMBLY) $(PROGRAMFILES) $(BINARIES)
+
+endif
FILES = \
poppler-sharp/Document.cs \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]