From c5b853601e965e2ffcc1288d1cfda7caabd9e2a4 Mon Sep 17 00:00:00 2001 From: Piotr Szymanski Date: Wed, 10 Aug 2005 23:58:01 +0000 Subject: [PATCH] - adding the libgs detection functions Ghostscript backend depends on libgs Ghostscript shared library. - BTW. anyone know how to add a -Lsth flag to KDE_CHECK_LIB so it can be found if nonstandard directory is chosen? svn path=/trunk/playground/graphics/oKular/kpdf/; revision=445369 --- generators/Makefile.am | 5 ++++- generators/configure.in.bot | 12 ++++++++++++ generators/configure.in.in | 17 +++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 generators/configure.in.bot create mode 100644 generators/configure.in.in diff --git a/generators/Makefile.am b/generators/Makefile.am index 371467443..65ce7e210 100644 --- a/generators/Makefile.am +++ b/generators/Makefile.am @@ -1 +1,4 @@ -SUBDIRS = ghostview xpdf kimgio +if include_ghostscript +GSPLUGINDIR = ghostview +endif +SUBDIRS = $(GSPLUGINDIR) xpdf kimgio diff --git a/generators/configure.in.bot b/generators/configure.in.bot new file mode 100644 index 000000000..949e4e712 --- /dev/null +++ b/generators/configure.in.bot @@ -0,0 +1,12 @@ +if test -z "$LIB_GS"; then +echo "" +echo "The Ghostscript library was not found in your system. ." +echo "The Ghostscript backend will not be available." +echo "If you need it, install Ghostscript with shared library," +echo "by using 'make so' instead of 'make' when building from" +echo "sources. For more information check: " +echo "http://kpdf.kde.org/ghostscript.php" +echo "or contact your package provider." +echo "" +fi + diff --git a/generators/configure.in.in b/generators/configure.in.in new file mode 100644 index 000000000..8e3c607bc --- /dev/null +++ b/generators/configure.in.in @@ -0,0 +1,17 @@ +ac_gs_libraries=NO +AC_ARG_WITH(gs-libraries, + AC_HELP_STRING([--with-gs-libraries=DIR],[where the Ghostscript library is installed.]), + [ ac_gs_libraries="$withval" ]) + +GSLIBDIR="" +LIB_GS="" + +if test "x$ac_gs_libraries" = "xNO"; then + GSLIBDIR="-L$ac_gs_libraries" +fi + +KDE_CHECK_LIB(gs, gsapi_new_instance, [LIB_GS="-lgs"]) + +AM_CONDITIONAL(include_ghostscript, test -n "$LIB_GS") + +