[dia] pdf: build experimental import also on posix
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] pdf: build experimental import also on posix
- Date: Sun, 18 Aug 2013 09:48:36 +0000 (UTC)
commit f4c62ee5f003111214d12b1262c920dab0ebf7fc
Author: Hans Breuer <hans breuer org>
Date: Sat Aug 17 22:18:52 2013 +0200
pdf: build experimental import also on posix
configure.in | 7 +++++++
plug-ins/pdf/Makefile.am | 18 ++++++++++++++++++
plug-ins/pdf/pdf-import.cpp | 3 ++-
3 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/configure.in b/configure.in
index a6f6bdd..fe28e7b 100644
--- a/configure.in
+++ b/configure.in
@@ -126,6 +126,12 @@ if test "$have_libart" = "yes" ; then
AC_DEFINE(HAVE_LIBART,1,[Define if building with LIBART support])
fi
+dnl Try for poppler
+PKG_CHECK_MODULES(POPPLER,poppler,have_poppler=yes,have_poppler=no)
+if test "$have_poppler" = "yes" ; then
+ AC_DEFINE(HAVE_POPPLER,1,[Define if building with POPPLER support])
+fi
+
AC_MSG_CHECKING([whether GNOME specific code should be used])
AC_ARG_ENABLE(gnome,
AC_HELP_STRING([--enable-gnome],[enable gnome code]),,
@@ -683,6 +689,7 @@ plug-ins/pixbuf/Makefile
plug-ins/postscript/Makefile
plug-ins/pstricks/Makefile
plug-ins/pgf/Makefile
+plug-ins/pdf/Makefile
plug-ins/python/Makefile
plug-ins/shape/Makefile
plug-ins/stress/Makefile
diff --git a/plug-ins/pdf/Makefile.am b/plug-ins/pdf/Makefile.am
new file mode 100644
index 0000000..90ce387
--- /dev/null
+++ b/plug-ins/pdf/Makefile.am
@@ -0,0 +1,18 @@
+plugin_sources = pdf.c pdf-import.cpp
+
+# Can't do without C++
+if HAVE_CPLUSPLUS
+pkglib_LTLIBRARIES = libpdf_filter.la
+endif
+
+libpdf_filter_la_SOURCES = $(plugin_sources)
+libpdf_filter_la_LDFLAGS = -export-dynamic -module -avoid-version $(NO_UNDEFINED)
+libpdf_filter_la_LIBADD = $(POPPLER_LIBS) $(top_builddir)/lib/libdia.la
+
+INCLUDES = -I$(top_srcdir)/intl -I$(top_srcdir)/lib \
+ $(DEBUG_FLAGS) $(GTK_CFLAGS)
+
+# Prevent installation
+install-pkglibLTLIBRARIES:
+ :
+
diff --git a/plug-ins/pdf/pdf-import.cpp b/plug-ins/pdf/pdf-import.cpp
index 4499ff4..4c82b0f 100644
--- a/plug-ins/pdf/pdf-import.cpp
+++ b/plug-ins/pdf/pdf-import.cpp
@@ -698,7 +698,7 @@ import_pdf(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
GooString *userPW = NULL;
gboolean ret = FALSE;
- // without this we will get strange crashes (at least with /O2 build
+ // without this we will get strange crashes (at least with /O2 build)
globalParams = new GlobalParams();
doc = PDFDocFactory().createPDFDoc(*fileName, ownerPW, userPW);
@@ -729,3 +729,4 @@ import_pdf(const gchar *filename, DiagramData *dia, DiaContext *ctx, void* user_
return ret;
}
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]