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