Commit ebe0bcc9 authored by Mukund Sivaraman's avatar Mukund Sivaraman

build: Add check for Ghostscript

parent 3f7a2dc9
......@@ -1171,6 +1171,25 @@ if test "x$have_zlib" = xyes && test "x$have_libbzip2" = xyes; then
have_compressor=yes
fi
###############################
# Check for Ghostscript library
###############################
have_gs=yes
if test -z "$GS_LIBS"; then
AC_CHECK_LIB(gs, gsapi_new_instance,
[AC_CHECK_HEADER(ghostscript/iapi.h,
FILE_PS='file-ps$(EXEEXT)'; GS_LIBS='-lgs',
[have_gs="no (Ghostscript header files not found)"])],
[have_gs="no (Ghostscript library not found)"])
fi
AC_SUBST(FILE_PS)
AM_CONDITIONAL(HAVE_GS, test "x$have_gs" = xyes)
AC_SUBST(GS_LIBS)
##################
# Check for libpng
##################
......@@ -2303,6 +2322,7 @@ Optional Features:
Optional Plug-Ins:
Ascii Art: $have_libaa
Compressor: $have_compressor
Ghostscript: $have_gs
Help Browser: $have_webkit
LCMS: $have_lcms
JPEG: $jpeg_ok
......
......@@ -111,7 +111,7 @@ libexec_PROGRAMS = \
file-pix \
$(FILE_PNG) \
file-pnm \
file-ps \
$(FILE_PS) \
$(FILE_PSP) \
file-raw \
file-sunras \
......@@ -196,6 +196,7 @@ EXTRA_PROGRAMS = \
file-pdf-load \
file-pdf-save \
file-png \
file-ps \
file-psp \
file-svg \
file-tiff-load \
......@@ -1381,6 +1382,7 @@ file_ps_LDADD = \
$(libgimpcolor) \
$(libgimpbase) \
$(GTK_LIBS) \
$(GS_LIBS) \
$(RT_LIBS) \
$(INTLLIBS) \
$(file_ps_RC)
......
......@@ -67,7 +67,7 @@
'file-pnm' => { ui => 1 },
'file-pdf-load' => { ui => 1, optional => 1, libs => 'POPPLER_LIBS', cflags => 'POPPLER_CFLAGS' },
'file-pdf-save' => { ui => 1, optional => 1, libs => 'CAIRO_PDF_LIBS', cflags => 'CAIRO_PDF_CFLAGS' },
'file-ps' => { ui => 1 },
'file-ps' => { ui => 1, optional => 1, libs => 'GS_LIBS' },
'file-psp' => { ui => 1, optional => 1, libs => 'Z_LIBS' },
'file-raw' => { ui => 1 },
'file-sunras' => { ui => 1 },
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment