]> git.ipfire.org Git - thirdparty/cups.git/blob - config-scripts/cups-image.m4
Import cups.org releases
[thirdparty/cups.git] / config-scripts / cups-image.m4
1 dnl
2 dnl "$Id: cups-image.m4 1794 2001-06-27 19:06:46Z mike $"
3 dnl
4 dnl Image library stuff for the Common UNIX Printing System (CUPS).
5 dnl
6 dnl Copyright 1997-2001 by Easy Software Products, all rights reserved.
7 dnl
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
13 dnl at:
14 dnl
15 dnl Attn: CUPS Licensing Information
16 dnl Easy Software Products
17 dnl 44141 Airport View Drive, Suite 204
18 dnl Hollywood, Maryland 20636-3111 USA
19 dnl
20 dnl Voice: (301) 373-9603
21 dnl EMail: cups-info@cups.org
22 dnl WWW: http://www.cups.org
23 dnl
24
25 dnl Save the current libraries since we don't want the image libraries
26 dnl included with every program...
27 SAVELIBS="$LIBS"
28
29 dnl Check for image libraries...
30 LIBJPEG=""
31 LIBPNG=""
32 LIBTIFF=""
33 LIBZ=""
34
35 AC_SUBST(LIBJPEG)
36 AC_SUBST(LIBPNG)
37 AC_SUBST(LIBTIFF)
38 AC_SUBST(LIBZ)
39
40 AC_CHECK_HEADER(jpeglib.h,
41 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
42 AC_DEFINE(HAVE_LIBJPEG)
43 LIBJPEG="-ljpeg"
44 LIBS="$LIBS -ljpeg"))
45
46 AC_CHECK_HEADER(zlib.h,
47 AC_CHECK_LIB(z, gzgets,
48 AC_DEFINE(HAVE_LIBZ)
49 LIBZ="-lz"
50 LIBS="$LIBS -lz"))
51
52 dnl PNG library uses math library functions...
53 AC_CHECK_LIB(m, pow)
54
55 AC_CHECK_HEADER(png.h,
56 AC_CHECK_LIB(png, png_set_tRNS_to_alpha,
57 AC_DEFINE(HAVE_LIBPNG)
58 LIBPNG="-lpng -lm"))
59
60 AC_CHECK_HEADER(tiff.h,
61 AC_CHECK_LIB(tiff, TIFFReadScanline,
62 AC_DEFINE(HAVE_LIBTIFF)
63 LIBTIFF="-ltiff"))
64
65 dnl Restore original LIBS settings...
66 LIBS="$SAVELIBS"
67
68 dnl
69 dnl End of "$Id: cups-image.m4 1794 2001-06-27 19:06:46Z mike $".
70 dnl