2011-09-13 16:13:41 +01:00
|
|
|
AC_PREREQ([2.63])
|
2008-09-03 20:06:26 -04:00
|
|
|
CAIRO_PARSE_VERSION
|
2005-08-10 11:08:38 +00:00
|
|
|
AC_INIT([cairo],
|
2008-09-05 01:07:30 -04:00
|
|
|
[cairo_version_major.cairo_version_minor.cairo_version_micro],
|
2021-01-18 17:55:04 +01:00
|
|
|
[https://gitlab.freedesktop.org/cairo/cairo/-/issues],
|
2011-09-13 16:13:41 +01:00
|
|
|
[cairo],
|
2018-10-16 12:02:48 +02:00
|
|
|
[https://cairographics.org/])
|
2010-11-04 17:57:03 +01:00
|
|
|
AC_CONFIG_AUX_DIR(build)
|
|
|
|
|
AC_CONFIG_MACRO_DIR(build)
|
2010-01-18 22:12:23 +00:00
|
|
|
AC_USE_SYSTEM_EXTENSIONS
|
2005-08-10 11:08:38 +00:00
|
|
|
AC_CONFIG_SRCDIR(src/cairo.h)
|
|
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2011-09-13 16:13:41 +01:00
|
|
|
|
2013-06-11 11:47:24 +01:00
|
|
|
AC_CHECK_HEADERS([unistd.h sys/ioctl.h])
|
2017-11-06 11:28:58 -08:00
|
|
|
AC_C_TYPEOF
|
2013-06-11 11:47:24 +01:00
|
|
|
|
Use the serial automake test harness
Once upon a time, automake had one way to run tests. Apparently this is
(nowadays?) called the serial test harness. Then, in some release (I do
not remember which one), the parallel test harness became the default.
The parallel harness runs all tests in parallel, but does not (really)
show the test output, but instead has output redirected to files. Sort
of. I did not find the result of my printf() anywhere.
The automake docs strongly discourage using the serial test harness [0],
but do not really say why. For cairo, I do not see problems:
We have some quick, small checks (e.g. is cairo_public used where needed
in the public headers). And then there is the big, heavy-weight test
suite (cairo-test-suite). Thus, running these things in parallel has
basically no benefits.
Additionally, cairo-test-suite takes really, really long. Not seeing any
output while it is running is annoying. Failing to find the output even
in files is bad.
Thus, since I do not see any benefits and only downsides to the parallel
test harness, this commit switches to the serial one.
[0]: https://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html
Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-03-04 08:10:10 +01:00
|
|
|
AM_INIT_AUTOMAKE([1.11 foreign -Wall no-define no-dist-gzip dist-xz serial-tests])
|
2011-09-13 16:15:49 +01:00
|
|
|
AM_SILENT_RULES([yes])
|
2014-07-08 12:39:02 -07:00
|
|
|
m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Workaround for Automake 1.12
|
2011-09-13 16:13:41 +01:00
|
|
|
|
|
|
|
|
# Initialize libtool
|
|
|
|
|
LT_PREREQ([2.2])
|
|
|
|
|
LT_INIT([win32-dll])
|
|
|
|
|
|
|
|
|
|
# Api documentation
|
2011-09-13 16:30:10 +01:00
|
|
|
GTK_DOC_CHECK([1.15],[--flavour no-tmpl])
|
2003-04-17 13:24:29 +00:00
|
|
|
|
2010-01-27 18:48:32 +00:00
|
|
|
AC_SYS_LARGEFILE
|
2010-01-18 22:12:23 +00:00
|
|
|
|
2005-08-10 11:08:38 +00:00
|
|
|
dnl ===========================================================================
|
2008-08-27 19:06:13 -04:00
|
|
|
dnl
|
2008-09-03 20:06:26 -04:00
|
|
|
dnl The order of the includes here is rather important
|
2008-08-27 19:06:13 -04:00
|
|
|
dnl
|
2008-09-04 22:30:49 -04:00
|
|
|
m4_include(build/configure.ac.version) dnl macros setting up various version declares
|
|
|
|
|
m4_include(build/configure.ac.tools) dnl checks for tools we use
|
2008-09-15 23:42:51 -04:00
|
|
|
m4_include(build/configure.ac.features) dnl macros for backend/feature handling
|
2008-09-04 22:30:49 -04:00
|
|
|
m4_include(build/configure.ac.warnings) dnl checks for compiler warning
|
2009-03-03 10:27:11 +00:00
|
|
|
m4_include(build/configure.ac.system) dnl checks for system functions, headers, libs
|
2008-09-04 22:30:49 -04:00
|
|
|
m4_include(build/configure.ac.analysis) dnl checks for analysis tools (lcov, etc)
|
2008-09-03 16:38:03 +01:00
|
|
|
m4_include(build/configure.ac.noversion) dnl disable builtin libtool versioning
|
2010-06-27 03:03:17 +03:00
|
|
|
m4_include(build/configure.ac.pthread) dnl checks for pthreads
|
2008-09-03 20:06:26 -04:00
|
|
|
AC_CACHE_SAVE
|
2007-10-25 10:24:01 +01:00
|
|
|
|
2007-09-21 10:45:55 +01:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2006-08-10 13:10:24 -04:00
|
|
|
AC_CHECK_LIB(z, compress,
|
2008-11-26 17:43:22 +00:00
|
|
|
[AC_CHECK_HEADER(zlib.h, [
|
|
|
|
|
have_libz=yes
|
|
|
|
|
AC_DEFINE(HAVE_ZLIB, 1, [Define to 1 if you have zlib available])
|
|
|
|
|
],
|
2006-08-10 13:10:24 -04:00
|
|
|
[have_libz="no (requires zlib http://www.gzip.org/zlib/)"])],
|
|
|
|
|
[have_libz="no (requires zlib http://www.gzip.org/zlib/)"])
|
|
|
|
|
|
2013-01-04 17:32:46 +00:00
|
|
|
save_LIBS="$LIBS"
|
|
|
|
|
AC_CHECK_LIB(lzo2, lzo2a_decompress,
|
|
|
|
|
[AC_CHECK_HEADER(lzo/lzo2a.h, [
|
|
|
|
|
have_lzo=yes
|
|
|
|
|
AC_DEFINE(HAVE_LZO, 1, [Define to 1 if you have lzo available])
|
|
|
|
|
lzo_LIBS="-llzo2"
|
|
|
|
|
],
|
|
|
|
|
[have_lzo="no (requires lzpo http://www.oberhumer.com/opensource/lzo/)"])],
|
|
|
|
|
[have_lzo="no (requires lzpo http://www.oberhumer.com/opensource/lzo/)"])
|
|
|
|
|
AC_SUBST(lzo_LIBS)
|
|
|
|
|
LIBS="$save_LIBS"
|
|
|
|
|
|
2009-08-23 15:25:42 +01:00
|
|
|
AC_CHECK_LIB(dl, dlsym,
|
2009-09-13 17:35:29 -06:00
|
|
|
[have_dlsym=yes; have_dl=yes],
|
|
|
|
|
[have_dlsym=no; have_dl=no])
|
|
|
|
|
if test "x$have_dlsym" = "xno"; then
|
|
|
|
|
AC_CHECK_FUNC(dlsym, [have_dlsym=yes], [have_dlsym=no])
|
|
|
|
|
fi
|
|
|
|
|
AC_CHECK_HEADERS(dlfcn.h, [have_dlsym=yes], [have_dlsym=no])
|
2009-08-23 15:25:42 +01:00
|
|
|
AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes")
|
2011-03-21 16:12:00 +02:00
|
|
|
if test "x$have_dlsym" = "xyes"; then
|
|
|
|
|
AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available])
|
|
|
|
|
fi
|
2012-04-09 21:33:50 +02:00
|
|
|
AM_CONDITIONAL(CAIRO_HAS_DLSYM, test "x$have_dlsym" = "xyes")
|
2009-08-23 15:25:42 +01:00
|
|
|
|
2017-09-17 11:17:13 -04:00
|
|
|
AC_CHECK_HEADERS(xlocale.h)
|
|
|
|
|
AC_CHECK_FUNCS(newlocale strtod_l)
|
|
|
|
|
|
2003-04-17 13:24:29 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(xlib, Xlib, auto, [
|
2012-08-13 01:34:12 +01:00
|
|
|
xlib_REQUIRES="x11 xext"
|
2006-08-18 17:17:28 -04:00
|
|
|
PKG_CHECK_MODULES(xlib, $xlib_REQUIRES, ,
|
2012-10-20 20:22:50 +02:00
|
|
|
[xlib_REQUIRES=""
|
2006-08-18 17:17:28 -04:00
|
|
|
AC_PATH_XTRA
|
|
|
|
|
if test "x$no_x" = xyes; then
|
|
|
|
|
use_xlib="no (requires X development libraries)"
|
|
|
|
|
else
|
2012-08-13 01:34:12 +01:00
|
|
|
xlib_NONPKGCONFIG_LIBS="$X_PRE_LIBS $X_LIBS -lX11 -lXext $X_EXTRA_LIBS"
|
2006-08-18 17:17:28 -04:00
|
|
|
xlib_NONPKGCONFIG_CFLAGS=$X_CFLAGS
|
|
|
|
|
fi])
|
2012-10-19 12:04:50 +01:00
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(sys/ipc.h)
|
|
|
|
|
AC_CHECK_HEADER(sys/shm.h)
|
|
|
|
|
|
|
|
|
|
if test "$ac_cv_header_sys_ipc_h" = "yes" -a "$ac_cv_header_sys_shm_h" = "yes"; then
|
|
|
|
|
AC_MSG_CHECKING(whether shmctl IPC_RMID allowes subsequent attaches)
|
2021-01-18 17:55:04 +01:00
|
|
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
2012-10-19 12:04:50 +01:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
#include <sys/ipc.h>
|
|
|
|
|
#include <sys/shm.h>
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
char *shmaddr;
|
|
|
|
|
int id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
|
|
|
|
|
if (id == -1) return 2;
|
|
|
|
|
shmaddr = shmat (id, 0, 0);
|
|
|
|
|
shmctl (id, IPC_RMID, 0);
|
|
|
|
|
if ((char*) shmat (id, 0, 0) == (char*) -1) {
|
|
|
|
|
shmdt (shmaddr);
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
shmdt (shmaddr);
|
|
|
|
|
shmdt (shmaddr);
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2021-01-18 17:55:04 +01:00
|
|
|
]])],
|
|
|
|
|
[
|
|
|
|
|
AC_DEFINE(IPC_RMID_DEFERRED_RELEASE, 1, Define to 1 if shared memory segments are released deferred.)
|
|
|
|
|
AC_MSG_RESULT(yes)],
|
|
|
|
|
[AC_MSG_RESULT(no)],[AC_MSG_RESULT(assuming no)])
|
2012-10-19 12:04:50 +01:00
|
|
|
fi
|
2012-10-28 10:04:12 +00:00
|
|
|
|
2012-10-28 10:08:39 +00:00
|
|
|
AC_CHECK_HEADERS([X11/extensions/XShm.h X11/extensions/shmproto.h X11/extensions/shmstr.h], [], [],
|
2012-10-28 10:04:12 +00:00
|
|
|
[#include <X11/Xlibint.h>
|
|
|
|
|
#include <X11/Xproto.h>])
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2004-04-09 14:14:56 +00:00
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(xlib_xrender, Xlib Xrender, auto, [
|
2006-08-18 17:02:24 -04:00
|
|
|
if test "x$use_xlib" != "xyes"; then
|
|
|
|
|
use_xlib_xrender="no (requires --enable-xlib)"
|
|
|
|
|
else
|
2006-06-26 12:21:18 +02:00
|
|
|
dnl Check for Xrender header files if the Xrender package is not installed:
|
2006-07-12 04:27:55 -04:00
|
|
|
xlib_xrender_BASE=cairo-xlib
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2006-06-25 17:43:27 +02:00
|
|
|
xlib_xrender_REQUIRES="xrender >= 0.6"
|
|
|
|
|
PKG_CHECK_MODULES(xlib_xrender, $xlib_xrender_REQUIRES, ,
|
2012-10-20 20:22:50 +02:00
|
|
|
[xlib_xrender_REQUIRES=""
|
2007-09-05 00:26:56 -04:00
|
|
|
old_CPPFLAGS=$CPPFLAGS
|
|
|
|
|
CPPFLAGS="$CPPFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS"
|
2006-06-25 17:43:27 +02:00
|
|
|
AC_CHECK_HEADER(X11/extensions/Xrender.h,
|
2006-08-18 17:02:24 -04:00
|
|
|
[xlib_xrender_NONPKGCONFIG_LIBS="-lXrender"],
|
2018-10-16 12:21:06 +02:00
|
|
|
[use_xlib_xrender="no (requires $xlib_xrender_REQUIRES https://freedesktop.org/Software/xlibs)"],
|
2013-01-29 10:31:05 +00:00
|
|
|
[#include <X11/X.h>])
|
2007-09-05 00:26:56 -04:00
|
|
|
CPPFLAGS=$old_CPPFLAGS
|
|
|
|
|
])
|
2011-02-07 22:13:53 +01:00
|
|
|
|
|
|
|
|
old_CFLAGS=$CFLAGS
|
|
|
|
|
old_LIBS=$LIBS
|
|
|
|
|
CFLAGS="$CFLAGS $xlib_CFLAGS $xlib_NONPKGCONFIG_CFLAGS $xlib_xrender_CFLAGS $xlib_xrender_NONPKGCONFIG_CFLAGS"
|
|
|
|
|
LIBS="$LIBS $xlib_LIBS $xlib_NONPKGCONFIG_LIBS $xlib_xrender_LIBS $xlib_xrender_NONPKGCONFIG_LIBS"
|
2013-12-16 19:27:02 -05:00
|
|
|
AC_CHECK_FUNCS([XRenderCreateSolidFill XRenderCreateLinearGradient XRenderCreateRadialGradient XRenderCreateConicalGradient])
|
2011-02-07 22:13:53 +01:00
|
|
|
CFLAGS=$old_CFLAGS
|
|
|
|
|
LIBS=$old_LIBS
|
|
|
|
|
|
2006-06-25 17:43:27 +02:00
|
|
|
fi
|
|
|
|
|
])
|
2004-10-26 14:38:43 +00:00
|
|
|
|
2006-06-21 06:25:01 -04:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2011-01-26 17:54:13 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(xcb, XCB, auto, [
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2011-09-16 10:43:44 +02:00
|
|
|
xcb_REQUIRES="xcb >= 1.6 xcb-render >= 1.6"
|
2010-01-22 21:26:26 +00:00
|
|
|
PKG_CHECK_MODULES(xcb, $xcb_REQUIRES, ,
|
2018-10-16 12:21:06 +02:00
|
|
|
[use_xcb="no (requires $xcb_REQUIRES https://xcb.freedesktop.org)"])
|
2010-01-22 21:26:26 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
CAIRO_ENABLE_FUNCTIONS(xlib_xcb, Xlib/XCB, no, [
|
2010-09-11 22:55:23 +02:00
|
|
|
if test "x$use_xcb" = "xyes" -a "x$use_xlib" = "xyes"; then
|
2010-01-22 21:26:26 +00:00
|
|
|
xlib_xcb_REQUIRES="x11-xcb"
|
|
|
|
|
PKG_CHECK_MODULES(xlib_xcb, $xlib_xcb_REQUIRES, ,
|
2018-10-16 12:21:06 +02:00
|
|
|
[use_xlib_xcb="no (requires $xlib_xcb_REQUIRES https://xcb.freedesktop.org)"])
|
2010-01-22 21:26:26 +00:00
|
|
|
else
|
|
|
|
|
use_xlib_xcb="no (requires both --enable-xlib and --enable-xcb)"
|
|
|
|
|
fi
|
2006-10-12 20:17:22 -07:00
|
|
|
])
|
|
|
|
|
|
2010-01-25 16:45:03 +00:00
|
|
|
CAIRO_ENABLE_FUNCTIONS(xcb_shm, XCB/SHM, auto, [
|
2010-09-11 22:55:23 +02:00
|
|
|
if test "x$use_xcb" = "xyes"; then
|
2010-01-25 16:45:03 +00:00
|
|
|
xcb_shm_REQUIRES="xcb-shm"
|
|
|
|
|
PKG_CHECK_MODULES(xcb_shm, $xcb_shm_REQUIRES, ,
|
2018-10-16 12:21:06 +02:00
|
|
|
[use_xcb_shm="no (requires $xcb_shm https://xcb.freedesktop.org)"])
|
2010-01-25 16:45:03 +00:00
|
|
|
else
|
2010-09-07 13:58:29 +01:00
|
|
|
use_xcb_shm="no (requires --enable-xcb)"
|
2010-01-25 16:45:03 +00:00
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2006-10-12 20:17:22 -07:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2009-06-14 20:43:05 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(qt, Qt, no, [
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2009-06-14 20:43:05 +01:00
|
|
|
qt_REQUIRES="QtGui >= 4.4.0"
|
|
|
|
|
PKG_CHECK_MODULES(qt, $qt_REQUIRES, ,
|
2012-10-20 20:22:50 +02:00
|
|
|
[qt_REQUIRES=""
|
2009-06-14 20:43:05 +01:00
|
|
|
use_qt="no (requires Qt4 development libraries)"
|
|
|
|
|
])
|
2014-07-08 15:53:41 -07:00
|
|
|
qt_NONPKGCONFIG_LIBS="-lstdc++"
|
2009-06-14 20:43:05 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(quartz, Quartz, auto, [
|
2007-03-05 23:19:24 +00:00
|
|
|
dnl There is no pkgconfig for quartz; lets do a header check
|
2008-09-10 23:23:08 -04:00
|
|
|
AC_CHECK_HEADER(ApplicationServices/ApplicationServices.h, , [use_quartz="no (requires ApplicationServices framework)"])
|
2008-03-20 13:24:48 -07:00
|
|
|
if test "x$use_quartz" != "xyes" ; then
|
|
|
|
|
dnl check for CoreGraphics as a separate framework
|
2008-09-10 23:23:08 -04:00
|
|
|
AC_CHECK_HEADER(CoreGraphics/CoreGraphics.h, , [use_quartz="no (requires CoreGraphics framework)"])
|
2008-03-20 13:24:48 -07:00
|
|
|
quartz_LIBS="-Xlinker -framework -Xlinker CoreGraphics"
|
|
|
|
|
else
|
|
|
|
|
quartz_LIBS="-Xlinker -framework -Xlinker ApplicationServices"
|
|
|
|
|
fi
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2005-01-20 20:41:40 +00:00
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_FONT_BACKEND(quartz_font, Quartz, auto, [
|
2008-03-17 17:37:19 -07:00
|
|
|
use_quartz_font=$use_quartz
|
|
|
|
|
])
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(quartz_image, Quartz Image, no, [
|
2008-03-17 17:37:19 -07:00
|
|
|
use_quartz_image=$use_quartz
|
2008-03-07 14:49:15 -08:00
|
|
|
])
|
|
|
|
|
|
2003-12-12 11:44:16 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(win32, Microsoft Windows, auto, [
|
2007-02-20 00:57:25 -05:00
|
|
|
if test "x$have_windows" != xyes; then
|
|
|
|
|
use_win32="no (requires a Win32 platform)"
|
|
|
|
|
fi
|
2006-06-25 17:43:27 +02:00
|
|
|
win32_LIBS="-lgdi32 -lmsimg32"
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2005-01-31 16:11:37 +00:00
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_FONT_BACKEND(win32_font, Microsoft Windows, auto, [
|
2007-02-20 00:57:25 -05:00
|
|
|
use_win32_font=$use_win32
|
2006-06-21 06:25:01 -04:00
|
|
|
])
|
2005-01-31 16:11:37 +00:00
|
|
|
|
2008-01-10 15:30:42 +00:00
|
|
|
test_win32_printing=no
|
|
|
|
|
if test "x$use_win32" = "xyes"; then
|
|
|
|
|
AC_CHECK_PROG(GS, gs, gs)
|
|
|
|
|
if test "$GS"; then
|
|
|
|
|
AC_DEFINE([CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE], 1, [Define to 1 if the Win32 Printing backend can be tested (needs ghostscript)])
|
|
|
|
|
test_win32_printing="yes"
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_WARN([Win32 Printing backend will not be tested since ghostscript is not available])
|
|
|
|
|
test_win32_printing="no (requires ghostscript)"
|
|
|
|
|
fi
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(CAIRO_CAN_TEST_WIN32_PRINTING_SURFACE, test "x$test_win32_printing" = "xyes")
|
|
|
|
|
|
2005-12-18 17:20:06 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(os2, OS/2, no, [
|
2006-09-15 11:18:47 +02:00
|
|
|
case "$host" in
|
|
|
|
|
*-*-os2*)
|
|
|
|
|
:
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
use_os2="no (requires an OS/2 platform)"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(beos, BeOS/Zeta, no, [
|
2006-04-25 07:30:16 -04:00
|
|
|
case "$host" in
|
|
|
|
|
*-*-beos)
|
2008-09-04 19:50:32 -04:00
|
|
|
beos_LIBS=""
|
2006-06-25 17:43:27 +02:00
|
|
|
dnl Add libbe and libzeta if available
|
|
|
|
|
AC_CHECK_LIB(be,main,beos_LIBS="$beos_LIBS -lbe")
|
|
|
|
|
AC_CHECK_LIB(zeta,main,beos_LIBS="$beos_LIBS -lzeta")
|
2006-04-25 07:30:16 -04:00
|
|
|
;;
|
|
|
|
|
*)
|
2006-06-21 07:00:34 -04:00
|
|
|
use_beos="no (requires a BeOS platform)"
|
2006-04-25 07:30:16 -04:00
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
])
|
2005-12-18 17:20:06 +00:00
|
|
|
|
2005-01-31 16:11:37 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2009-06-11 15:18:55 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(drm, DRM, no, [
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2015-12-29 10:16:54 +01:00
|
|
|
drm_REQUIRES="libudev >= 136, libdrm >= 2.4"
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(drm, $drm_REQUIRES, ,
|
|
|
|
|
[use_drm="no (requires $drm_REQUIRES, udev is available from git://git.kernel.org/pub/scm/linux/hotplug/udev.git)"])
|
2009-06-11 15:18:55 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(gallium, Gallium3D, no, [
|
|
|
|
|
if test "x$use_drm" = "xyes"; then
|
|
|
|
|
AC_ARG_WITH([gallium],
|
|
|
|
|
[AS_HELP_STRING([--with-gallium=/path/to/mesa],
|
|
|
|
|
[directory to find gallium enabled mesa])],
|
|
|
|
|
[mesa_DIR="$withval"],
|
|
|
|
|
[mesa_DIR="`pwd`/../mesa"])
|
|
|
|
|
gallium_DIR="$mesa_DIR/src/gallium"
|
|
|
|
|
gallium_NONPKGCONFIG_CFLAGS="-I$mesa_DIR/include -I$mesa_DIR/src/mesa -I$gallium_DIR/include -I$gallium_DIR/auxiliary"
|
|
|
|
|
gallium_NONPKGCONFIG_LIBS="-lGL"
|
|
|
|
|
AC_SUBST(mesa_DIR)
|
|
|
|
|
AC_SUBST(gallium_DIR)
|
|
|
|
|
else
|
|
|
|
|
use_gallium="no (requires --enable-drm)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_FUNCTIONS(png, PNG, yes, [
|
2005-01-31 16:11:37 +00:00
|
|
|
use_png=no
|
2006-08-11 13:06:37 -04:00
|
|
|
AC_ARG_VAR([png_REQUIRES], [module name for libpng to search for using pkg-config])
|
|
|
|
|
if test "x$png_REQUIRES" = x; then
|
|
|
|
|
# libpng13 is GnuWin32's libpng-1.2.8 :-(
|
2010-08-28 13:39:21 +02:00
|
|
|
for l in libpng libpng14 libpng12 libpng13 libpng10; do
|
2006-08-11 13:06:37 -04:00
|
|
|
if $PKG_CONFIG --exists $l ; then
|
|
|
|
|
png_REQUIRES=$l
|
|
|
|
|
use_png=yes
|
|
|
|
|
break
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
else
|
|
|
|
|
use_png=yes
|
|
|
|
|
fi
|
2005-01-31 16:11:37 +00:00
|
|
|
|
|
|
|
|
if test "x$use_png" = "xyes" ; then
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(png, $png_REQUIRES, , : )
|
2005-01-31 16:11:37 +00:00
|
|
|
else
|
|
|
|
|
AC_MSG_WARN([Could not find libpng in the pkg-config search path])
|
|
|
|
|
fi
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2004-02-24 12:27:52 +00:00
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
2009-07-21 22:28:44 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(gl, OpenGL, no, [
|
2009-01-29 09:19:01 -08:00
|
|
|
gl_REQUIRES="gl"
|
2009-09-13 23:16:57 +01:00
|
|
|
PKG_CHECK_MODULES(gl, $gl_REQUIRES,, [
|
|
|
|
|
dnl Fallback to searching for headers
|
|
|
|
|
AC_CHECK_HEADER(GL/gl.h,, [use_gl="no (gl.pc nor OpenGL headers not found)"])
|
|
|
|
|
if test "x$use_gl" = "xyes"; then
|
|
|
|
|
gl_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
gl_NONPKGCONFIG_LIBS="-lGL"
|
|
|
|
|
fi])
|
2009-03-28 20:59:01 -07:00
|
|
|
|
2011-03-21 16:12:00 +02:00
|
|
|
if test "x$have_dl" = "xyes" -a "x$have_dlsym" = "xyes"; then
|
|
|
|
|
gl_LIBS="$gl_LIBS -ldl"
|
|
|
|
|
fi
|
|
|
|
|
|
2009-07-21 22:28:44 +01:00
|
|
|
need_glx_functions=yes
|
2010-06-14 01:20:54 +02:00
|
|
|
need_wgl_functions=yes
|
2010-03-11 01:48:43 +00:00
|
|
|
need_egl_functions=yes
|
2011-03-03 23:17:31 +02:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(glesv2, OpenGLESv2, no, [
|
|
|
|
|
glesv2_REQUIRES="glesv2"
|
|
|
|
|
PKG_CHECK_MODULES(glesv2, $glesv2_REQUIRES,, [
|
|
|
|
|
dnl Fallback to searching for headers
|
|
|
|
|
AC_CHECK_HEADER(GLES2/gl2.h,, [use_glesv2="no (glesv2.pc nor OpenGL ES 2.0 headers not found)"])
|
|
|
|
|
if test "x$use_glesv2" = "xyes"; then
|
|
|
|
|
glesv2_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
glesv2_NONPKGCONFIG_LIBS="-lGLESv2"
|
|
|
|
|
fi])
|
|
|
|
|
|
2011-03-21 16:12:00 +02:00
|
|
|
if test "x$have_dl" = "xyes" -a "x$have_dlsym" = "xyes"; then
|
|
|
|
|
glesv2_LIBS="$glesv2_LIBS -ldl"
|
|
|
|
|
fi
|
|
|
|
|
|
2014-08-20 11:45:19 +05:30
|
|
|
if test "x$use_glesv2" = "xyes" -a "x$use_gl" = "xyes"; then
|
|
|
|
|
AC_MSG_ERROR([use either --enable-gl=yes or --enable-glesv2=yes. Not both at the same time.])
|
|
|
|
|
fi
|
|
|
|
|
|
2011-03-03 23:17:31 +02:00
|
|
|
need_egl_functions=yes
|
2009-05-19 15:53:55 +01:00
|
|
|
])
|
|
|
|
|
|
2017-09-13 12:35:27 -07:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(glesv3, OpenGLESv3, no, [
|
2018-06-12 12:34:48 -07:00
|
|
|
dnl glesv3 is provided via libGLESv2.so, so require glesv2.pc (there is no libGLESv3, nor glesv3.pc)
|
|
|
|
|
glesv3_REQUIRES="glesv2"
|
2017-09-13 12:35:27 -07:00
|
|
|
PKG_CHECK_MODULES(glesv3, $glesv3_REQUIRES,, [
|
2018-06-12 12:34:48 -07:00
|
|
|
use_glesv3="no (glesv2.pc not found, required for glesv3)"
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl Since there is no glesv3.pc, need to search for header files
|
|
|
|
|
AC_CHECK_HEADER(GLES3/gl3.h,, [use_glesv3="no (OpenGL ES 3.0 headers not found)"])
|
|
|
|
|
if test "x$use_glesv3" = "xyes"; then
|
|
|
|
|
glesv3_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
glesv3_NONPKGCONFIG_LIBS="-lGLESv2"
|
|
|
|
|
fi
|
2017-09-13 12:35:27 -07:00
|
|
|
|
|
|
|
|
if test "x$have_dl" = "xyes" -a "x$have_dlsym" = "xyes"; then
|
|
|
|
|
glesv3_LIBS="$glesv3_LIBS -ldl"
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if test "x$use_glesv3" = "xyes" -a "x$use_gl" = "xyes"; then
|
|
|
|
|
AC_MSG_ERROR([use either --enable-gl=yes or --enable-glesv3=yes. Not both at the same time.])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
need_egl_functions=yes
|
|
|
|
|
])
|
|
|
|
|
|
2004-02-24 12:27:52 +00:00
|
|
|
dnl ===========================================================================
|
2011-07-21 12:15:05 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(cogl, Cogl, no, [
|
2020-09-04 07:11:53 -06:00
|
|
|
cogl_REQUIRES="cogl-2.0-experimental >= 1.17.2"
|
2011-07-21 12:15:05 +01:00
|
|
|
PKG_CHECK_MODULES(cogl, $cogl_REQUIRES,, [use_cogl="no"])
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
2004-02-24 12:27:52 +00:00
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(directfb, directfb, no, [
|
2006-06-25 17:43:27 +02:00
|
|
|
directfb_REQUIRES=directfb
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(directfb, $directfb_REQUIRES, ,
|
2008-09-10 23:23:08 -04:00
|
|
|
[use_directfb="no (requires $directfb_REQUIRES http://www.directfb.org)"])
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2005-12-29 07:17:01 +00:00
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2009-07-15 16:37:25 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(vg, OpenVG, no, [
|
|
|
|
|
dnl There is no pkgconfig for OpenVG; lets do a header check
|
|
|
|
|
AC_CHECK_HEADER(VG/openvg.h,, [use_vg="no (OpenVG headers not found)"])
|
|
|
|
|
if test "x$use_vg" = "xyes"; then
|
|
|
|
|
vg_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
vg_NONPKGCONFIG_LIBS="-lOpenVG"
|
|
|
|
|
need_egl_functions=yes
|
|
|
|
|
need_glx_functions=yes
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
CAIRO_ENABLE_FUNCTIONS(egl, EGL, auto, [
|
|
|
|
|
if test "x$need_egl_functions" = "xyes"; then
|
2010-03-11 01:48:43 +00:00
|
|
|
egl_REQUIRES="egl"
|
|
|
|
|
PKG_CHECK_MODULES(egl, $egl_REQUIRES, ,
|
|
|
|
|
[egl_REQUIRES=""
|
|
|
|
|
AC_CHECK_HEADER(EGL/egl.h,, [use_egl="no (EGL headers not found)"])
|
|
|
|
|
if test "x$use_egl" = "xyes"; then
|
|
|
|
|
egl_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
egl_NONPKGCONFIG_LIBS=
|
|
|
|
|
save_LIBS="$LIBS"
|
|
|
|
|
other_egl_LIBS=""
|
|
|
|
|
# Temporary workaround for missing link from egl13
|
|
|
|
|
AC_CHECK_LIB(csi, csi_stream_attachresource, other_egl_LIBS="-lcsi")
|
|
|
|
|
LIBS="$other_egl_LIBS $LIBS"
|
|
|
|
|
for egl_lib in EGL egl13 egl12 egl11; do
|
|
|
|
|
if test -z "$egl_NONPKGCONFIG_LIBS"; then
|
|
|
|
|
AC_CHECK_LIB($egl_lib, eglGetError, egl_NONPKGCONFIG_LIBS="-l$egl_lib")
|
|
|
|
|
fi
|
|
|
|
|
done
|
|
|
|
|
if test -z "$egl_NONPKGCONFIG_LIBS"; then
|
|
|
|
|
use_egl="no (EGL library not found)"
|
|
|
|
|
else
|
|
|
|
|
egl_NONPKGCONFIG_LIBS="$egl_NONPKGCONFIG_LIBS $other_egl_LIBS"
|
|
|
|
|
fi
|
|
|
|
|
LIBS="$save_LIBS"
|
|
|
|
|
fi
|
|
|
|
|
])
|
2009-07-15 16:37:25 +01:00
|
|
|
else
|
|
|
|
|
use_egl="no (not required by any backend)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
CAIRO_ENABLE_FUNCTIONS(glx, GLX, auto, [
|
|
|
|
|
if test "x$need_glx_functions" = "xyes"; then
|
2009-09-14 10:36:08 +01:00
|
|
|
save_CFLAGS="$CFLAGS"
|
|
|
|
|
CFLAGS="$CFLAGS $gl_CFLAGS $gl_NONPKGCONFIG_CFLAGS"
|
2009-07-15 16:37:25 +01:00
|
|
|
AC_CHECK_HEADER(GL/glx.h,, [use_glx="no (GLX headers not found)"])
|
|
|
|
|
glx_NONPKGCONFIG_CFLAGS=
|
|
|
|
|
glx_NONPKGCONFIG_LIBS="-lGL"
|
2009-09-14 10:36:08 +01:00
|
|
|
CFLAGS="$save_CFLAGS"
|
2009-07-15 16:37:25 +01:00
|
|
|
else
|
|
|
|
|
use_glx="no (not required by any backend)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2010-06-14 01:20:54 +02:00
|
|
|
CAIRO_ENABLE_FUNCTIONS(wgl, WGL, auto, [
|
|
|
|
|
if test "x$need_wgl_functions" = "xyes"; then
|
|
|
|
|
AC_CHECK_HEADER(windows.h,, [use_wgl="no (WGL headers not found)"])
|
|
|
|
|
else
|
|
|
|
|
use_wgl="no (not required by any backend)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2009-07-15 16:37:25 +01:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-11-13 11:07:45 +00:00
|
|
|
any2ppm_cs=no
|
2011-08-14 20:56:15 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(script, script, yes, [
|
2008-11-13 11:07:45 +00:00
|
|
|
any2ppm_cs=yes
|
2015-11-26 18:56:48 +01:00
|
|
|
# The script backend requires zlib.
|
|
|
|
|
use_script=$have_libz
|
|
|
|
|
script_NONPKGCONFIG_LIBS=-lz
|
2008-11-04 10:45:34 +00:00
|
|
|
])
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2005-08-17 15:57:45 +00:00
|
|
|
# We use pkg-config to look for freetype2, but fall back to
|
|
|
|
|
# freetype-config if it fails. We prefer pkg-config, since we can
|
|
|
|
|
# then just put freetype2 >= $FREETYPE_MIN_VERSION in
|
|
|
|
|
# Requires.private, but at least up to 2003-06-07, there was no
|
|
|
|
|
# freetype2.pc in the release.
|
2003-11-08 10:28:04 +00:00
|
|
|
#
|
2006-06-21 07:00:34 -04:00
|
|
|
# FreeType versions come in three forms:
|
2007-12-01 20:41:55 -05:00
|
|
|
# release (such as 2.1.9)
|
|
|
|
|
# libtool (such as 9.7.3) (returned by freetype-config and pkg-config)
|
2003-11-08 10:28:04 +00:00
|
|
|
# platform-specific/soname (such as 6.3.4)
|
|
|
|
|
# and they recommend you never use the platform-specific version
|
|
|
|
|
# (see docs/VERSION.DLL in freetype2 sources)
|
|
|
|
|
#
|
|
|
|
|
# Set these as appropriate:
|
|
|
|
|
|
|
|
|
|
# release number - for information only
|
2007-12-01 20:41:55 -05:00
|
|
|
FREETYPE_MIN_RELEASE=2.1.9
|
2003-11-18 13:21:29 +00:00
|
|
|
# libtool-specific version - this is what is checked
|
2018-05-21 20:08:22 +02:00
|
|
|
# Keep in sync with meson.build!
|
2007-12-01 20:41:55 -05:00
|
|
|
FREETYPE_MIN_VERSION=9.7.3
|
2003-11-08 10:28:04 +00:00
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_FONT_BACKEND(ft, FreeType, auto, [
|
2008-05-28 12:01:38 -04:00
|
|
|
|
2006-06-25 17:43:27 +02:00
|
|
|
PKG_CHECK_MODULES(FREETYPE, freetype2 >= $FREETYPE_MIN_VERSION,
|
2007-01-21 15:11:31 -05:00
|
|
|
[freetype_pkgconfig=yes],
|
2012-10-20 20:22:50 +02:00
|
|
|
[freetype_pkgconfig=no])
|
2005-08-17 15:57:45 +00:00
|
|
|
|
2006-06-25 17:43:27 +02:00
|
|
|
if test "x$freetype_pkgconfig" = "xyes"; then
|
|
|
|
|
ft_REQUIRES="freetype2 >= $FREETYPE_MIN_VERSION $ft_REQUIRES"
|
|
|
|
|
else
|
2005-08-17 15:57:45 +00:00
|
|
|
|
2006-06-25 17:43:27 +02:00
|
|
|
if test -z "$FREETYPE_CONFIG"; then
|
|
|
|
|
AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no)
|
|
|
|
|
fi
|
|
|
|
|
if test "x$FREETYPE_CONFIG" = "xno" ; then
|
|
|
|
|
use_ft='no (freetype-config not found in path or $FREETYPE_CONFIG)'
|
2005-08-18 17:22:23 +00:00
|
|
|
else
|
2006-06-25 17:43:27 +02:00
|
|
|
AC_MSG_CHECKING(freetype2 libtool version)
|
|
|
|
|
|
|
|
|
|
FREETYPE_VERSION=`$FREETYPE_CONFIG --version`
|
2009-01-02 15:36:39 +00:00
|
|
|
AX_COMPARE_VERSION([$FREETYPE_VERSION], [gt], [$FREETYPE_MIN_VERSION],
|
|
|
|
|
[AC_MSG_RESULT($FREETYPE_VERSION - OK)
|
|
|
|
|
ft_NONPKGCONFIG_CFLAGS=`$FREETYPE_CONFIG --cflags`
|
|
|
|
|
ft_NONPKGCONFIG_LIBS=`$FREETYPE_CONFIG --libs`],
|
|
|
|
|
[AC_MSG_RESULT($FREETYPE_VERSION - Too old)
|
|
|
|
|
use_ft="no ($FREETYPE_VERSION found; version $FREETYPE_MIN_VERSION from release $FREETYPE_MIN_RELEASE required)"])
|
2005-08-18 17:22:23 +00:00
|
|
|
fi
|
2005-08-17 15:57:45 +00:00
|
|
|
fi
|
2009-03-17 00:53:30 -04:00
|
|
|
|
|
|
|
|
ft_CFLAGS="$FREETYPE_CFLAGS"
|
|
|
|
|
ft_LIBS="$FREETYPE_LIBS"
|
|
|
|
|
])
|
|
|
|
|
|
2018-05-21 20:08:22 +02:00
|
|
|
# Keep in sync with meson.build!
|
2009-06-19 18:34:34 +03:00
|
|
|
FONTCONFIG_MIN_VERSION=2.2.95
|
2009-03-17 00:53:30 -04:00
|
|
|
CAIRO_ENABLE_FONT_BACKEND(fc, Fontconfig, auto, [
|
|
|
|
|
use_fc=$use_ft
|
|
|
|
|
if test "x$use_fc" = "xyes"; then
|
2009-06-19 18:34:34 +03:00
|
|
|
fc_REQUIRES="fontconfig >= $FONTCONFIG_MIN_VERSION"
|
2009-03-17 00:53:30 -04:00
|
|
|
PKG_CHECK_MODULES(FONTCONFIG, $fc_REQUIRES,,
|
2012-10-20 20:22:50 +02:00
|
|
|
[use_fc="no (requires $fc_REQUIRES)"])
|
2005-01-17 09:18:37 +00:00
|
|
|
fi
|
2009-03-17 00:53:30 -04:00
|
|
|
fc_CFLAGS="$FONTCONFIG_CFLAGS"
|
|
|
|
|
fc_LIBS="$FONTCONFIG_LIBS"
|
2006-06-25 17:43:27 +02:00
|
|
|
])
|
2003-11-08 10:28:04 +00:00
|
|
|
|
2006-06-21 07:00:34 -04:00
|
|
|
if test "x$use_ft" = "xyes"; then
|
2008-09-01 23:35:03 -04:00
|
|
|
_save_libs="$LIBS"
|
|
|
|
|
_save_cflags="$CFLAGS"
|
2006-06-25 17:43:27 +02:00
|
|
|
LIBS="$LIBS $ft_LIBS"
|
|
|
|
|
CFLAGS="$CFLAGS $ft_CFLAGS"
|
2005-08-21 09:27:52 +00:00
|
|
|
|
2018-01-15 19:28:56 -05:00
|
|
|
AC_CHECK_FUNCS(FT_Get_X11_Font_Format FT_GlyphSlot_Embolden FT_GlyphSlot_Oblique FT_Load_Sfnt_Table FT_Library_SetLcdFilter FT_Get_Var_Design_Coordinates FT_Done_MM_Var)
|
2005-08-21 09:27:52 +00:00
|
|
|
|
2018-04-03 18:01:09 -07:00
|
|
|
AC_MSG_CHECKING(for FT_HAS_COLOR)
|
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
|
|
|
|
#include <ft2build.h>
|
|
|
|
|
#include FT_FREETYPE_H
|
|
|
|
|
],[
|
|
|
|
|
FT_Long has_color = FT_HAS_COLOR( ((FT_Face)NULL) );
|
|
|
|
|
])],[AC_MSG_RESULT([yes])],[
|
|
|
|
|
AC_DEFINE([FT_HAS_COLOR(x)], [(0)], [Define to (0) if freetype2 does not support color fonts])
|
|
|
|
|
AC_MSG_RESULT([no, disable color font (freetype2 >= 2.5.1 is required)])
|
|
|
|
|
])
|
|
|
|
|
|
2008-09-01 23:35:03 -04:00
|
|
|
LIBS="$_save_libs"
|
|
|
|
|
CFLAGS="$_save_cflags"
|
2005-01-17 09:18:37 +00:00
|
|
|
fi
|
2003-11-08 10:28:04 +00:00
|
|
|
|
2009-03-17 00:53:30 -04:00
|
|
|
if test "x$use_fc" = "xyes"; then
|
2009-06-06 21:45:18 +01:00
|
|
|
CAIRO_CHECK_FUNCS_WITH_FLAGS(FcInit FcFini, [$FONTCONFIG_CFLAGS], [$FONTCONFIG_LIBS])
|
2009-03-17 00:53:30 -04:00
|
|
|
fi
|
|
|
|
|
|
2003-04-17 13:24:29 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(ps, PostScript, yes, [
|
2007-08-29 12:18:16 -04:00
|
|
|
# The ps backend requires zlib.
|
|
|
|
|
use_ps=$have_libz
|
|
|
|
|
ps_NONPKGCONFIG_LIBS=-lz
|
|
|
|
|
])
|
|
|
|
|
|
2008-07-21 16:29:57 -04:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2018-05-21 20:08:22 +02:00
|
|
|
# Keep in sync with meson.build!
|
2008-10-09 12:11:51 +01:00
|
|
|
SPECTRE_VERSION_REQUIRED=0.2.0
|
2007-07-05 15:24:11 +01:00
|
|
|
test_ps=no
|
2008-10-09 12:11:51 +01:00
|
|
|
any2ppm_ps=no
|
2007-07-05 15:24:11 +01:00
|
|
|
if test "x$use_ps" = "xyes"; then
|
|
|
|
|
AC_CHECK_PROG(GS, gs, gs)
|
|
|
|
|
if test "$GS"; then
|
|
|
|
|
AC_DEFINE([CAIRO_CAN_TEST_PS_SURFACE], 1, [Define to 1 if the PS backend can be tested (needs ghostscript)])
|
|
|
|
|
test_ps="yes"
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_WARN([PS backend will not be tested since ghostscript is not available])
|
|
|
|
|
test_ps="no (requires ghostscript)"
|
|
|
|
|
fi
|
2008-10-09 12:11:51 +01:00
|
|
|
|
|
|
|
|
libspectre_DEPENDENCY="libspectre >= $SPECTRE_VERSION_REQUIRED"
|
|
|
|
|
PKG_CHECK_MODULES(LIBSPECTRE, $libspectre_DEPENDENCY,
|
|
|
|
|
[any2ppm_ps=yes],
|
2009-09-08 17:51:33 +01:00
|
|
|
[test_ps="no (requires libspectre)"])
|
2007-07-05 15:24:11 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(CAIRO_CAN_TEST_PS_SURFACE, test "x$test_ps" = "xyes")
|
2008-10-11 18:10:16 +01:00
|
|
|
AM_CONDITIONAL(CAIRO_HAS_SPECTRE, test "x$any2ppm_ps" = "xyes")
|
|
|
|
|
if test "x$any2ppm_ps" = "xyes"; then
|
|
|
|
|
AC_DEFINE([CAIRO_HAS_SPECTRE], 1, [Define to 1 if libspectre is available])
|
|
|
|
|
fi
|
2008-10-09 12:11:51 +01:00
|
|
|
AC_SUBST(LIBSPECTRE_CFLAGS)
|
|
|
|
|
AC_SUBST(LIBSPECTRE_LIBS)
|
2005-07-28 10:24:59 +00:00
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(pdf, PDF, yes, [
|
2006-07-11 09:23:18 -04:00
|
|
|
# The pdf backend requires zlib.
|
2006-08-10 13:10:24 -04:00
|
|
|
use_pdf=$have_libz
|
2006-07-12 04:27:55 -04:00
|
|
|
pdf_NONPKGCONFIG_LIBS=-lz
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2005-01-31 16:11:37 +00:00
|
|
|
|
2008-07-21 16:29:57 -04:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2011-09-13 22:25:38 +09:30
|
|
|
# poppler-0.17.4 fixes text-pattern and text-transform
|
2018-05-21 20:08:22 +02:00
|
|
|
# Keep in sync with meson.build!
|
2011-09-13 22:25:38 +09:30
|
|
|
POPPLER_VERSION_REQUIRED=0.17.4
|
2005-12-07 16:06:11 +00:00
|
|
|
test_pdf=no
|
2008-10-09 12:11:51 +01:00
|
|
|
any2ppm_pdf=no
|
2005-05-06 21:33:22 +00:00
|
|
|
if test "x$use_pdf" = "xyes"; then
|
2006-09-26 13:54:03 -04:00
|
|
|
poppler_DEPENDENCY="poppler-glib >= $POPPLER_VERSION_REQUIRED"
|
2008-11-05 19:27:49 +00:00
|
|
|
PKG_CHECK_MODULES(POPPLER, $poppler_DEPENDENCY,
|
2008-09-15 19:31:28 -04:00
|
|
|
[CAIRO_CHECK_FUNCS_WITH_FLAGS(poppler_page_render, [$POPPLER_CFLAGS], [$POPPLER_LIBS],
|
2008-10-09 12:11:51 +01:00
|
|
|
[test_pdf=yes; any2ppm_pdf=yes],
|
2009-09-08 17:51:33 +01:00
|
|
|
[test_pdf="no (requires $poppler_DEPENDENCY)"])],
|
|
|
|
|
[test_pdf="no (requires $poppler_DEPENDENCY)"])
|
2005-12-07 16:06:11 +00:00
|
|
|
if test "x$test_pdf" = "xyes"; then
|
|
|
|
|
AC_DEFINE([CAIRO_CAN_TEST_PDF_SURFACE], 1, [Define to 1 if the PDF backend can be tested (need poppler and other dependencies for pdf2png)])
|
|
|
|
|
else
|
2006-08-31 08:35:39 -07:00
|
|
|
AC_MSG_WARN([PDF backend will not be tested since poppler >= $POPPLER_VERSION_REQUIRED is not available])
|
2005-12-07 16:06:11 +00:00
|
|
|
fi
|
2005-01-31 16:11:37 +00:00
|
|
|
fi
|
|
|
|
|
|
2005-12-07 16:06:11 +00:00
|
|
|
AM_CONDITIONAL(CAIRO_CAN_TEST_PDF_SURFACE, test "x$test_pdf" = "xyes")
|
|
|
|
|
AC_SUBST(POPPLER_CFLAGS)
|
|
|
|
|
AC_SUBST(POPPLER_LIBS)
|
|
|
|
|
|
2006-01-12 16:35:12 +00:00
|
|
|
AM_CONDITIONAL(CAIRO_HAS_MULTI_PAGE_SURFACES, test "x$use_ps" = "xyes" -o "x$use_pdf" = "xyes")
|
|
|
|
|
|
2005-01-31 16:11:37 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(svg, SVG, yes, [
|
2006-08-17 22:10:27 -04:00
|
|
|
if test "x$use_png" != "xyes"; then
|
|
|
|
|
use_svg="no (requires --enable-png)"
|
|
|
|
|
fi
|
2006-04-25 07:30:16 -04:00
|
|
|
])
|
2005-12-08 13:09:26 +00:00
|
|
|
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2014-01-29 09:57:24 -08:00
|
|
|
LIBRSVG_VERSION_REQUIRED=2.35.0
|
2007-10-10 12:32:16 +01:00
|
|
|
test_svg=no
|
2008-10-09 12:11:51 +01:00
|
|
|
any2ppm_svg=no
|
2005-12-08 13:09:26 +00:00
|
|
|
if test "x$use_svg" = "xyes"; then
|
2006-09-26 13:54:03 -04:00
|
|
|
librsvg_DEPENDENCY="librsvg-2.0 >= $LIBRSVG_VERSION_REQUIRED"
|
2007-01-21 15:11:31 -05:00
|
|
|
PKG_CHECK_MODULES(LIBRSVG, $librsvg_DEPENDENCY gdk-2.0,
|
2008-09-03 20:06:26 -04:00
|
|
|
[CAIRO_CHECK_FUNCS_WITH_FLAGS(rsvg_pixbuf_from_file, [$LIBRSVG_CFLAGS], [$LIBRSVG_LIBS],
|
2008-10-09 12:11:51 +01:00
|
|
|
[test_svg=yes; any2ppm_svg=yes],
|
2009-09-08 17:51:33 +01:00
|
|
|
[test_svg="no (requires $librsvg_DEPENDENCY)"])],
|
|
|
|
|
[test_svg="no (requires $librsvg_DEPENDENCY)"])
|
2005-12-19 13:59:34 +00:00
|
|
|
if test "x$test_svg" = "xyes"; then
|
2006-08-31 08:35:39 -07:00
|
|
|
AC_DEFINE([CAIRO_CAN_TEST_SVG_SURFACE], 1, [Define to 1 if the SVG backend can be tested])
|
2005-12-19 13:59:34 +00:00
|
|
|
else
|
2006-08-31 08:35:39 -07:00
|
|
|
AC_MSG_WARN([SVG backend will not be tested since librsvg >= $LIBRSVG_VERSION_REQUIRED is not available])
|
2005-12-19 13:59:34 +00:00
|
|
|
fi
|
2005-12-08 13:09:26 +00:00
|
|
|
fi
|
|
|
|
|
|
2005-12-19 13:59:34 +00:00
|
|
|
AM_CONDITIONAL(CAIRO_CAN_TEST_SVG_SURFACE, test "x$test_svg" = "xyes")
|
|
|
|
|
AC_SUBST(LIBRSVG_CFLAGS)
|
|
|
|
|
AC_SUBST(LIBRSVG_LIBS)
|
|
|
|
|
|
2008-09-02 20:20:49 -04:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
|
|
|
|
dnl XXX make this a private feature?
|
2008-09-04 19:50:32 -04:00
|
|
|
CAIRO_ENABLE(test_surfaces, test surfaces, no)
|
2008-09-02 20:20:49 -04:00
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-10 23:23:08 -04:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(image, image, always, [
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2018-12-03 15:13:40 +01:00
|
|
|
pixman_REQUIRES="pixman-1 >= 0.36.0"
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(pixman, $pixman_REQUIRES, ,
|
2018-10-16 12:02:48 +02:00
|
|
|
[use_image="no (requires $pixman_REQUIRES https://cairographics.org/releases/)"])
|
2008-09-11 01:04:13 -04:00
|
|
|
image_REQUIRES=$pixman_REQUIRES
|
|
|
|
|
image_CFLAGS=$pixman_CFLAGS
|
|
|
|
|
image_LIBS=$pixman_LIBS
|
2008-09-10 23:23:08 -04:00
|
|
|
])
|
|
|
|
|
|
2012-08-12 19:10:04 +01:00
|
|
|
if pkg-config --exists 'pixman-1 >= 0.27.1'; then
|
|
|
|
|
AC_DEFINE([HAS_PIXMAN_GLYPHS], 1, [Enable pixman glyph cache])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
2008-09-10 23:23:08 -04:00
|
|
|
dnl ===========================================================================
|
2008-09-02 20:20:49 -04:00
|
|
|
|
2011-08-02 22:31:49 +01:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(mime, mime, always)
|
2009-10-22 02:13:36 +03:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(recording, recording, always)
|
2011-08-30 16:15:28 +02:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(observer, observer, always)
|
2010-07-30 21:48:14 +02:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(tee, tee, no)
|
2010-07-30 22:04:44 +02:00
|
|
|
CAIRO_ENABLE_SURFACE_BACKEND(xml, xml, no, [
|
2020-12-19 11:10:13 +01:00
|
|
|
if test "x$use_png" != "xyes"; then
|
|
|
|
|
use_xml="no (requires --enable-png)"
|
|
|
|
|
else
|
|
|
|
|
use_xml=$have_libz
|
|
|
|
|
xml_NONPKGCONFIG_LIBS=-lz
|
|
|
|
|
fi
|
2009-08-18 14:25:25 +01:00
|
|
|
])
|
2009-07-03 18:26:50 +01:00
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-09-10 23:23:08 -04:00
|
|
|
CAIRO_ENABLE_FONT_BACKEND(user, user, always)
|
2008-09-02 20:20:49 -04:00
|
|
|
|
2010-06-27 03:03:17 +03:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl
|
|
|
|
|
dnl This needs to be last on our list of features so that the pthread libs and flags
|
|
|
|
|
dnl gets prefixed in front of everything else in CAIRO_{CFLAGS,LIBS}.
|
|
|
|
|
dnl
|
|
|
|
|
have_real_pthread=no
|
|
|
|
|
have_pthread=no
|
|
|
|
|
CAIRO_ENABLE(pthread, pthread, auto, [CAIRO_CONFIGURE_PTHREAD])
|
|
|
|
|
AM_CONDITIONAL(HAVE_REAL_PTHREAD, test "x$use_pthread" = "xyes" -a "x$have_real_pthread" = "xyes")
|
|
|
|
|
AM_CONDITIONAL(HAVE_PTHREAD, test "x$use_pthread" = "xyes")
|
|
|
|
|
AC_SUBST(pthread_CFLAGS)
|
|
|
|
|
AC_SUBST(pthread_LIBS)
|
|
|
|
|
AC_SUBST(real_pthread_CFLAGS)
|
|
|
|
|
AC_SUBST(real_pthread_LIBS)
|
|
|
|
|
|
|
|
|
|
|
2010-08-07 20:05:42 +02:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl Build gobject integration library
|
|
|
|
|
|
2010-08-07 21:32:09 +02:00
|
|
|
CAIRO_ENABLE_FUNCTIONS(gobject, gobject, auto, [
|
2018-05-21 20:08:22 +02:00
|
|
|
dnl Keep in sync with meson.build!
|
2013-09-13 22:18:08 +02:00
|
|
|
gobject_REQUIRES="gobject-2.0 glib-2.0 >= 2.14"
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES, ,
|
2018-10-16 13:46:52 +02:00
|
|
|
[use_gobject="no (requires $gobject_REQUIRES https://download.gnome.org/pub/GNOME/sources/glib/)"])
|
2010-09-01 18:46:46 +02:00
|
|
|
gobject_NONPKGCONFIG_EXTRA_LIBS="-L\${libdir} -lcairo-gobject"
|
2010-08-07 20:05:42 +02:00
|
|
|
])
|
2010-09-01 18:47:16 +02:00
|
|
|
dnl I'm too lazy to fix the caching properly
|
|
|
|
|
if test "x$use_gobject" = "xyes"; then
|
2012-10-20 20:22:50 +02:00
|
|
|
PKG_CHECK_MODULES(GOBJECT, $gobject_REQUIRES, : )
|
2010-09-01 18:47:16 +02:00
|
|
|
fi
|
2010-08-07 20:05:42 +02:00
|
|
|
|
2008-09-03 16:38:03 +01:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl Default to quick testing during development, but force a full test before
|
|
|
|
|
dnl release
|
|
|
|
|
|
|
|
|
|
AC_ARG_ENABLE(full-testing,
|
|
|
|
|
AS_HELP_STRING([--enable-full-testing],
|
|
|
|
|
[Sets the test suite to perform full testing by default, which
|
|
|
|
|
will dramatically slow down make check, but is a
|
|
|
|
|
*requirement* before release.]), [
|
|
|
|
|
if test "x$enableval" = "xyes"; then
|
|
|
|
|
CAIRO_TEST_MODE=full
|
|
|
|
|
AC_SUBST(CAIRO_TEST_MODE)
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2008-08-18 18:50:00 +01:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl Build the external converter if we have any of the test backends
|
|
|
|
|
AM_CONDITIONAL(BUILD_ANY2PPM,
|
2008-10-09 12:11:51 +01:00
|
|
|
test "x$any2ppm_svg" = "xyes" \
|
|
|
|
|
-o "x$any2ppm_pdf" = "xyes" \
|
2008-11-13 11:07:45 +00:00
|
|
|
-o "x$any2ppm_ps" = "xyes" \
|
|
|
|
|
-o "x$any2ppm_cs" = "xyes")
|
2008-08-18 18:50:00 +01:00
|
|
|
|
2009-11-03 22:51:29 +01:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl Some utilities need to dlopen the shared libraries, so they need to
|
|
|
|
|
dnl know how libtools will name them
|
|
|
|
|
|
|
|
|
|
case $host in
|
|
|
|
|
*-*-darwin*)
|
|
|
|
|
SHLIB_EXT="dylib"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
SHLIB_EXT="so"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
AC_DEFINE_UNQUOTED(SHARED_LIB_EXT, "${SHLIB_EXT}", [Shared library file extension])
|
|
|
|
|
AC_SUBST(SHLIB_EXT)
|
|
|
|
|
|
2008-10-31 15:37:58 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
dnl The tracing utility requires LD_PRELOAD, so only build it for systems
|
|
|
|
|
dnl that are known to work.
|
|
|
|
|
|
|
|
|
|
case $host in
|
2011-01-25 14:33:11 +01:00
|
|
|
*-linux*|*-*bsd*|*-solaris*|*-*-darwin*|*-dragonfly*|*-*-gnu*)
|
2008-10-31 15:37:58 +00:00
|
|
|
have_ld_preload="yes"
|
|
|
|
|
;;
|
|
|
|
|
*)
|
|
|
|
|
have_ld_preload="no"
|
|
|
|
|
;;
|
|
|
|
|
esac
|
|
|
|
|
|
2009-09-13 12:53:07 +01:00
|
|
|
CAIRO_ENABLE(trace, cairo-trace, auto, [
|
2009-09-08 17:51:33 +01:00
|
|
|
if test "x$have_ld_preload" != "xyes" -o \
|
|
|
|
|
"x$have_libz" != "xyes" -o \
|
2010-06-27 03:03:17 +03:00
|
|
|
"x$have_real_pthread" != "xyes" -o \
|
2009-09-13 17:35:29 -06:00
|
|
|
"x$have_dlsym" != "xyes"; then
|
2010-06-27 03:03:17 +03:00
|
|
|
use_trace="no (requires dynamic linker and zlib and real pthreads)"
|
2009-09-05 15:21:50 +01:00
|
|
|
fi
|
|
|
|
|
])
|
2008-10-31 15:37:58 +00:00
|
|
|
|
2009-09-08 17:51:33 +01:00
|
|
|
CAIRO_ENABLE(interpreter, cairo-script-interpreter, yes, [
|
2009-09-09 01:16:08 +01:00
|
|
|
if test "x$have_libz" != "xyes"; then
|
2009-09-08 17:51:33 +01:00
|
|
|
use_interpreter="no (requires zlib)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
2009-08-22 22:20:35 +01:00
|
|
|
|
2008-11-03 11:30:38 +00:00
|
|
|
AC_CHECK_LIB(bfd, bfd_openr,
|
|
|
|
|
[AC_CHECK_HEADER(bfd.h, [have_bfd=yes],
|
2008-11-03 23:16:09 +00:00
|
|
|
[have_bfd=no])], [have_bfd=no])
|
2021-02-23 11:36:24 +00:00
|
|
|
dnl bfd_section_flags is an inline func so we don't bother with linking the lib in
|
|
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
|
|
|
|
#include <bfd.h>
|
|
|
|
|
asection *s;
|
|
|
|
|
],[
|
|
|
|
|
return bfd_section_flags(s) == 0;
|
|
|
|
|
])],[],[have_bfd=no])
|
2008-11-03 11:30:38 +00:00
|
|
|
if test "x$have_bfd" = "xyes"; then
|
2008-11-03 23:16:09 +00:00
|
|
|
AC_DEFINE([HAVE_BFD], [1], [Define to 1 if you have the binutils development files installed])
|
2008-11-03 11:30:38 +00:00
|
|
|
BFD_LIBS=-lbfd
|
|
|
|
|
AC_SUBST(BFD_LIBS)
|
|
|
|
|
fi
|
|
|
|
|
|
2009-09-13 12:53:07 +01:00
|
|
|
CAIRO_ENABLE(symbol_lookup, symbol-lookup, auto, [
|
2009-09-13 10:52:14 +01:00
|
|
|
if test "x$have_bfd" != "xyes"; then
|
|
|
|
|
use_symbol_lookup="no (requires bfd)"
|
|
|
|
|
fi
|
|
|
|
|
])
|
|
|
|
|
|
2009-08-18 10:55:54 +01:00
|
|
|
PKG_CHECK_MODULES(glib, glib-2.0, have_glib=yes, have_glib=no)
|
|
|
|
|
AC_SUBST(glib_CFLAGS)
|
|
|
|
|
AC_SUBST(glib_LIBS)
|
2020-12-19 11:24:46 +01:00
|
|
|
AM_CONDITIONAL(BUILD_SPHINX, test "x$have_glib" = "xyes" -a "x$have_windows" = "xno" -a "x$use_png" = "xyes")
|
2009-08-18 10:55:54 +01:00
|
|
|
|
2010-03-31 16:19:02 +01:00
|
|
|
save_LIBS="$LIBS"
|
|
|
|
|
AC_CHECK_LIB(rt, shm_open, shm_LIBS="-lrt")
|
|
|
|
|
AC_SUBST(shm_LIBS)
|
|
|
|
|
LIBS="$save_LIBS"
|
|
|
|
|
|
2005-12-14 16:22:06 +00:00
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2006-12-01 12:41:55 -08:00
|
|
|
AC_ARG_ENABLE(some-floating-point,
|
|
|
|
|
AS_HELP_STRING([--disable-some-floating-point],
|
|
|
|
|
[Disable certain code paths that rely heavily on double precision
|
|
|
|
|
floating-point calculation. This option can improve
|
|
|
|
|
performance on systems without a double precision floating-point
|
|
|
|
|
unit, but might degrade performance on those that do.]), [
|
|
|
|
|
if test "x$enableval" = "xno"; then
|
|
|
|
|
# A value of 'no' for $enableval means that they want to disable, which
|
|
|
|
|
# means 'yes' for $disable_some_floating_point.
|
|
|
|
|
disable_some_floating_point=yes
|
|
|
|
|
fi
|
2006-12-02 11:24:35 -08:00
|
|
|
], [disable_some_floating_point=no])
|
2006-12-01 12:41:55 -08:00
|
|
|
|
|
|
|
|
AM_CONDITIONAL(DISABLE_SOME_FLOATING_POINT,
|
|
|
|
|
test "x$disable_some_floating_point" = "xyes")
|
|
|
|
|
if test "x$disable_some_floating_point" = "xyes"; then
|
|
|
|
|
AC_DEFINE(DISABLE_SOME_FLOATING_POINT, 1,
|
|
|
|
|
[Define to 1 to disable certain code paths that rely heavily on
|
|
|
|
|
double precision floating-point calculation])
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2010-07-09 12:29:35 +02:00
|
|
|
dnl Extra stuff we need to do when building C++ code
|
|
|
|
|
need_cxx="no"
|
|
|
|
|
AS_IF([test "x$use_qt" = "xyes"], [need_cxx="yes"])
|
|
|
|
|
AS_IF([test "x$use_beos" = "xyes"], [need_cxx="yes"])
|
|
|
|
|
|
|
|
|
|
AM_CONDITIONAL(BUILD_CXX, test "x$need_cxx" = "xyes")
|
|
|
|
|
|
|
|
|
|
dnl ===========================================================================
|
|
|
|
|
|
2008-10-16 11:56:19 +01:00
|
|
|
# We use GTK+ for some utility/debugging tools
|
2009-06-06 14:58:46 +01:00
|
|
|
PKG_CHECK_MODULES(gtk, "gtk+-2.0",have_gtk=yes, have_gtk=no)
|
|
|
|
|
AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")
|
2008-10-16 11:56:19 +01:00
|
|
|
|
2006-06-21 06:25:01 -04:00
|
|
|
AC_CONFIG_FILES([
|
2003-04-17 13:24:29 +00:00
|
|
|
Makefile
|
2006-08-30 15:34:27 -07:00
|
|
|
boilerplate/Makefile
|
2003-04-17 13:24:29 +00:00
|
|
|
src/Makefile
|
2004-10-26 14:38:43 +00:00
|
|
|
test/Makefile
|
2006-11-21 14:19:35 -08:00
|
|
|
test/pdiff/Makefile
|
2006-08-31 07:19:05 -07:00
|
|
|
perf/Makefile
|
2011-06-21 18:12:29 +02:00
|
|
|
perf/micro/Makefile
|
2007-04-21 07:48:10 -04:00
|
|
|
util/Makefile
|
2009-08-16 21:08:22 +01:00
|
|
|
util/cairo-fdr/Makefile
|
2010-08-07 20:05:42 +02:00
|
|
|
util/cairo-gobject/Makefile
|
2011-08-30 16:16:04 +02:00
|
|
|
util/cairo-missing/Makefile
|
2008-11-13 11:07:45 +00:00
|
|
|
util/cairo-script/Makefile
|
2008-12-10 13:50:23 +00:00
|
|
|
util/cairo-script/examples/Makefile
|
2009-08-18 10:55:54 +01:00
|
|
|
util/cairo-sphinx/Makefile
|
2008-10-31 15:37:58 +00:00
|
|
|
util/cairo-trace/Makefile
|
|
|
|
|
util/cairo-trace/cairo-trace
|
2005-01-27 11:35:25 +00:00
|
|
|
doc/Makefile
|
|
|
|
|
doc/public/Makefile
|
2003-04-17 13:24:29 +00:00
|
|
|
])
|
2014-07-11 10:58:14 -04:00
|
|
|
AC_CONFIG_COMMANDS([cairo-trace],
|
|
|
|
|
[chmod a+x util/cairo-trace/cairo-trace])
|
2004-04-09 14:14:56 +00:00
|
|
|
|
2006-06-21 06:25:01 -04:00
|
|
|
AC_OUTPUT
|
2008-09-04 16:41:51 -04:00
|
|
|
CAIRO_REPORT
|