4
dnl Image library/filter stuff for OpenPrinting CUPS Filters.
6
dnl Copyright 2007-2011 by Apple Inc.
7
dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
9
dnl These coded instructions, statements, and computer programs are the
10
dnl property of Apple Inc. and are protected by Federal copyright
11
dnl law. Distribution and use rights are outlined in the file "LICENSE.txt"
12
dnl which should have been included with this file. If this file is
13
dnl file is missing or damaged, see the license at "http://www.cups.org/".
16
dnl See if we want the image filters included at all...
17
AC_ARG_ENABLE(image, [ --enable-image always build the image filters])
20
if test "x$enable_image" != xno; then
21
IMGFILTERS="imagetops imagetoraster"
25
dnl Check for image libraries...
26
AC_ARG_ENABLE(jpeg, [ --disable-jpeg disable JPEG support])
27
AC_ARG_ENABLE(png, [ --disable-png disable PNG support])
28
AC_ARG_ENABLE(tiff, [ --disable-tiff disable TIFF support])
40
dnl Image libraries use math library functions...
41
AC_SEARCH_LIBS(pow, m)
43
dnl Save the current libraries since we don't want the image libraries
44
dnl included with every program...
48
if test x$enable_jpeg != xno; then
49
AC_CHECK_HEADER(jpeglib.h,
50
AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
51
AC_DEFINE(HAVE_LIBJPEG)
55
AC_MSG_NOTICE([JPEG support disabled with --disable-jpeg.])
59
AC_CHECK_HEADER(zlib.h,
60
AC_CHECK_LIB(z, gzgets,
66
if test x$enable_png != xno; then
67
AC_CHECK_HEADER(png.h,
68
AC_CHECK_LIB(png, png_create_read_struct,
69
AC_DEFINE(HAVE_LIBPNG)
72
AC_MSG_NOTICE([PNG support disabled with --disable-png.])
76
if test x$enable_tiff != xno; then
77
AC_CHECK_HEADER(tiff.h,
78
AC_CHECK_LIB(tiff, TIFFReadScanline,
79
AC_DEFINE(HAVE_LIBTIFF)
82
AC_MSG_NOTICE([TIFF support disabled with --disable-tiff.])
85
dnl Restore original LIBS settings...
88
AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))