2 dnl "$Id: cups-image.m4 5311 2006-03-19 13:21:42Z mike $"
4 dnl Image library/filter stuff for the Common UNIX Printing System (CUPS).
6 dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
8 dnl These coded instructions, statements, and computer programs are the
9 dnl property of Easy Software Products and are protected by Federal
10 dnl copyright law. Distribution and use rights are outlined in the file
11 dnl "LICENSE.txt" which should have been included with this file. If this
12 dnl file is missing or damaged please contact Easy Software Products
15 dnl Attn: CUPS Licensing Information
16 dnl Easy Software Products
17 dnl 44141 Airport View Drive, Suite 204
18 dnl Hollywood, Maryland 20636 USA
20 dnl Voice: (301) 373-9600
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
25 dnl See if we want the image filters included at all...
26 AC_ARG_ENABLE(image, [ --enable-image turn on image filters, default=auto])
29 if test "x$enable_image" != xno; then
30 AC_MSG_CHECKING(whether to build image filters)
31 if test "x$enable_image" = xyes -o $uname != Darwin; then
32 IMGFILTERS="imagetops imagetoraster"
41 dnl Save the current libraries since we don't want the image libraries
42 dnl included with every program...
45 dnl Check for image libraries...
46 AC_ARG_ENABLE(jpeg, [ --enable-jpeg turn on JPEG support, default=yes])
47 AC_ARG_ENABLE(png, [ --enable-png turn on PNG support, default=yes])
48 AC_ARG_ENABLE(tiff, [ --enable-tiff turn on TIFF support, default=yes])
60 if test x$enable_jpeg != xno; then
61 AC_CHECK_HEADER(jpeglib.h,
62 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
63 AC_DEFINE(HAVE_LIBJPEG)
67 AC_MSG_NOTICE([JPEG support disabled with --disable-jpeg.])
70 AC_CHECK_HEADER(zlib.h,
71 AC_CHECK_LIB(z, gzgets,
76 dnl PNG library uses math library functions...
79 if test x$enable_png != xno; then
80 AC_CHECK_HEADER(png.h,
81 AC_CHECK_LIB(png, png_set_tRNS_to_alpha,
82 AC_DEFINE(HAVE_LIBPNG)
85 AC_MSG_NOTICE([PNG support disabled with --disable-png.])
88 if test x$enable_tiff != xno; then
89 AC_CHECK_HEADER(tiff.h,
90 AC_CHECK_LIB(tiff, TIFFReadScanline,
91 AC_DEFINE(HAVE_LIBTIFF)
94 AC_MSG_NOTICE([TIFF support disabled with --disable-tiff.])
97 dnl Restore original LIBS settings...
100 EXPORT_LIBJPEG="$LIBJPEG"
101 EXPORT_LIBPNG="$LIBPNG"
102 EXPORT_LIBTIFF="$LIBTIFF"
105 AC_SUBST(EXPORT_LIBJPEG)
106 AC_SUBST(EXPORT_LIBPNG)
107 AC_SUBST(EXPORT_LIBTIFF)
108 AC_SUBST(EXPORT_LIBZ)
110 AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
113 dnl End of "$Id: cups-image.m4 5311 2006-03-19 13:21:42Z mike $".