summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-03-11 21:42:52 +0000
committerKristian Høgsberg <krh@redhat.com>2005-03-11 21:42:52 +0000
commit83e904452f205a2c0cd2723cb12b7fd4640ce342 (patch)
tree2788fa4b27312c6bac7679705942eac56b47bd95 /configure.ac
parente2af71338fd89760c4ac76999985efc5eb92817f (diff)
2005-03-11 Kristian Høgsberg <krh@redhat.com>
From Jeff Muizelaar <jrmuizel@nit.ca>: * configure.ac: Add checks for libjpeg. * DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am: Conditionally use libjpeg instead of xpdf jpeg decoder.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 33 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index e856ae30..52cd8259 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,6 +82,37 @@ if test "$xpdf_cv_func_fseek64" = yes -a "$xpdf_cv_func_ftell64" = yes; then
AC_DEFINE(HAVE_FSEEK64)
fi
+
+dnl Test for libjpeg
+AC_ARG_ENABLE(libjpeg,
+ AC_HELP_STRING([--disable-libjpeg],
+ [Don't build against libjpeg.]),
+ enable_libjpeg=$enableval,
+ enable_libjpeg="try")
+if test x$enable_libjpeg = xyes; then
+ AC_CHECK_LIB([jpeg], [jpeg_destroy_decompress],,
+ AC_MSG_ERROR("*** libjpeg library not found ***))
+ AC_CHECK_HEADERS([jpeglib.h],,
+ AC_MSG_ERROR("*** libjpeg headers not found ***))
+elif test x$enable_libjpeg = xtry; then
+ AC_CHECK_LIB([jpeg], [jpeg_destroy_decompress],
+ [enable_libjpeg="yes"],
+ [enable_libjpeg="no"])
+ AC_CHECK_HEADERS([jpeglib.h],,
+ [enable_libjpeg="no"])
+fi
+
+if test x$enable_libjpeg = xyes; then
+ LIBJPEG_LIBS="-ljpeg"
+ AC_SUBST(LIBJPEG_LIBS)
+ AC_DEFINE(ENABLE_LIBJPEG)
+fi
+
+AM_CONDITIONAL(BUILD_LIBJPEG, test x$enable_libjpeg = xyes)
+AH_TEMPLATE([ENABLE_LIBJPEG],
+ [Use libjpeg instead of builtin jpeg decoder.])
+
+
dnl Check for freetype headers
FREETYPE_LIBS=
FREETYPE_CFLAGS=
@@ -173,4 +204,5 @@ poppler-splash.pc])
echo ""
echo "Building poppler with support for:"
echo " splash output: $enable_splash_output"
-echo " cairo output: $enable_cairo_output"
+echo " cairo output: $enable_cairo_output"
+echo " use libjpeg: $enable_libjpeg"