]> git.ipfire.org Git - thirdparty/cups.git/blame - config-scripts/cups-image.m4
Load cups into easysw/current.
[thirdparty/cups.git] / config-scripts / cups-image.m4
CommitLineData
ef416fc2 1dnl
f7faf1f5 2dnl "$Id: cups-image.m4 5580 2006-05-23 19:30:23Z mike $"
ef416fc2 3dnl
e1d6a774 4dnl Image library/filter stuff for the Common UNIX Printing System (CUPS).
ef416fc2 5dnl
e1d6a774 6dnl Copyright 1997-2006 by Easy Software Products, all rights reserved.
ef416fc2 7dnl
8dnl These coded instructions, statements, and computer programs are the
9dnl property of Easy Software Products and are protected by Federal
10dnl copyright law. Distribution and use rights are outlined in the file
11dnl "LICENSE.txt" which should have been included with this file. If this
12dnl file is missing or damaged please contact Easy Software Products
13dnl at:
14dnl
15dnl Attn: CUPS Licensing Information
16dnl Easy Software Products
17dnl 44141 Airport View Drive, Suite 204
18dnl Hollywood, Maryland 20636 USA
19dnl
20dnl Voice: (301) 373-9600
21dnl EMail: cups-info@cups.org
22dnl WWW: http://www.cups.org
23dnl
24
e1d6a774 25dnl See if we want the image filters included at all...
26AC_ARG_ENABLE(image, [ --enable-image turn on image filters, default=auto])
27
28IMGFILTERS=""
29if 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"
33 AC_MSG_RESULT(yes)
34 else
35 AC_MSG_RESULT(no)
36 fi
37fi
38
39AC_SUBST(IMGFILTERS)
40
ef416fc2 41dnl Check for image libraries...
42AC_ARG_ENABLE(jpeg, [ --enable-jpeg turn on JPEG support, default=yes])
43AC_ARG_ENABLE(png, [ --enable-png turn on PNG support, default=yes])
44AC_ARG_ENABLE(tiff, [ --enable-tiff turn on TIFF support, default=yes])
45
46LIBJPEG=""
47LIBPNG=""
48LIBTIFF=""
49LIBZ=""
50
51AC_SUBST(LIBJPEG)
52AC_SUBST(LIBPNG)
53AC_SUBST(LIBTIFF)
54AC_SUBST(LIBZ)
55
ed486911 56dnl Image libraries use math library functions...
57AC_SEARCH_LIBS(pow, m)
58
59dnl Save the current libraries since we don't want the image libraries
60dnl included with every program...
61SAVELIBS="$LIBS"
62
63dnl JPEG library...
ef416fc2 64if test x$enable_jpeg != xno; then
65 AC_CHECK_HEADER(jpeglib.h,
66 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
67 AC_DEFINE(HAVE_LIBJPEG)
68 LIBJPEG="-ljpeg"
69 LIBS="$LIBS -ljpeg"))
70else
71 AC_MSG_NOTICE([JPEG support disabled with --disable-jpeg.])
72fi
73
ed486911 74dnl ZLIB library...
ef416fc2 75AC_CHECK_HEADER(zlib.h,
76 AC_CHECK_LIB(z, gzgets,
77 AC_DEFINE(HAVE_LIBZ)
78 LIBZ="-lz"
79 LIBS="$LIBS -lz"))
80
ed486911 81dnl PNG library...
ef416fc2 82if test x$enable_png != xno; then
83 AC_CHECK_HEADER(png.h,
89d46774 84 AC_CHECK_LIB(png, png_create_read_struct,
ef416fc2 85 AC_DEFINE(HAVE_LIBPNG)
ed486911 86 LIBPNG="-lpng"))
ef416fc2 87else
88 AC_MSG_NOTICE([PNG support disabled with --disable-png.])
89fi
90
ed486911 91dnl TIFF library...
ef416fc2 92if test x$enable_tiff != xno; then
93 AC_CHECK_HEADER(tiff.h,
94 AC_CHECK_LIB(tiff, TIFFReadScanline,
95 AC_DEFINE(HAVE_LIBTIFF)
96 LIBTIFF="-ltiff"))
97else
98 AC_MSG_NOTICE([TIFF support disabled with --disable-tiff.])
99fi
100
101dnl Restore original LIBS settings...
102LIBS="$SAVELIBS"
103
104EXPORT_LIBJPEG="$LIBJPEG"
105EXPORT_LIBPNG="$LIBPNG"
106EXPORT_LIBTIFF="$LIBTIFF"
107EXPORT_LIBZ="$LIBZ"
108
109AC_SUBST(EXPORT_LIBJPEG)
110AC_SUBST(EXPORT_LIBPNG)
111AC_SUBST(EXPORT_LIBTIFF)
112AC_SUBST(EXPORT_LIBZ)
113
114AC_CHECK_HEADER(stdlib.h,AC_DEFINE(HAVE_STDLIB_H))
115
116dnl
f7faf1f5 117dnl End of "$Id: cups-image.m4 5580 2006-05-23 19:30:23Z mike $".
ef416fc2 118dnl