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") + +