Re: Disabling Ghostscript support

Przemysław Sobala <[email protected]> Fri, 24 Jul 2020 09:58:55 +0200
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <CAGKkJopgmUvbJQR8FziVLSNSc40y1yD_hug7KKCwO3MqCgouOA@mail.gmail.com>
On Thu, Jul 23, 2020 at 3:44 PM Bob Friesenhahn <
[email protected]> wrote:

> On Thu, 23 Jul 2020, [email protected] wrote:
> > I was trying to disable Ghostcript support and came up with a patch
> (attached).
> >
> >  1. But gm convert -list delegates still shows formats using gs.
> >     Does delegates.mgk should be modified or coders should make use of
> HAVE_GS/HAVE_PS macro?
>
> Your patch is not helpful/useful because it is regarding use of a
> Ghostscript library ('libgs') which was never enabled by default.  The
> configure script support for using that library was removed in 2018
> although the pre-processor definitions remain.
>

Hmm... In configure.ac I can see that a test for Ghostscript presence is
made for a binary not a library:

PSDelegateDefault='gs'
[...]
*AC_PATH_PROG*(PSDelegate, "$PSDelegateDefault", "$PSDelegateDefault")
[...]
have_gs='no'      ; if test "$with_gs" = "yes" && test "$PSDelegate" !=
"$PSDelegateDefault"; then have_gs='yes' ; fi

and if I remove /usr/bin/gs from my system, ./configure reports:

Ghostscript       --with-gs=yes                 *no *(gs unknown)

So maybe we could use "*#define **have_gs/have_ps"* to surround:

entry->decoder=(DecoderHandler) ReadPDFImage;
entry->encoder=(EncoderHandler) WritePDFImage;

and disable postscript-based formats when Ghostscript is not present or
disabled?

--
Best regards
Przemysław Sobala

_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help