1 dnl Process this file with autoconf to produce a configure script.
5 dnl Making releases on the stable branch:
6 dnl GEGL_MICRO_VERSION += 1;
7 dnl GEGL_INTERFACE_AGE += 1;
8 dnl GEGL_BINARY_AGE += 1;
9 dnl if any functions have been added,
10 dnl set GEGL_INTERFACE_AGE to 0.
11 dnl if backwards compatibility has been broken,
12 dnl set GEGL_BINARY_AGE _and_ GEGL_INTERFACE_AGE to 0.
15 m4_define([gegl_major_version], [0])
16 m4_define([gegl_minor_version], [3])
17 m4_define([gegl_micro_version], [1])
18 m4_define([gegl_real_version],
19 [gegl_major_version.gegl_minor_version.gegl_micro_version])
20 m4_define([gegl_version], [gegl_real_version])
22 dnl Number of releases since we've added interfaces
23 m4_define([gegl_interface_age], [0])
24 m4_define([gegl_binary_age],
25 [m4_eval(100 * gegl_minor_version + gegl_micro_version)])
27 m4_define([gegl_api_version], [gegl_major_version.gegl_minor_version])
29 m4_define([stability_version_number],
30 m4_if(m4_eval(gegl_major_version || gegl_minor_version), [0],
31 [gegl_micro_version], [gegl_minor_version]))
32 m4_define([gegl_unstable],
33 m4_if(m4_eval(stability_version_number % 2), [1], [yes], [no]))
34 m4_define([gegl_stable],
35 m4_if(m4_eval(stability_version_number % 2), [0], [yes], [no]))
37 m4_define([gimp_full_name], [Generic Graphical Library])
39 # required versions of external libraries
40 m4_define([babl_required_version], [0.1.12])
41 m4_define([cairo_required_version], [0.0.0])
42 m4_define([gdk_pixbuf_required_version], [2.18.0])
43 m4_define([introspection_required_version], [1.32.0])
44 m4_define([glib_required_version], [2.36.0])
45 m4_define([graphviz_required_version], [0.0.0])
46 m4_define([jasper_required_version], [1.900.1])
47 m4_define([lcms_required_version], [2.2])
48 m4_define([lensfun_required_version], [0.2.5])
49 m4_define([librsvg_required_version], [2.14.0])
50 m4_define([libv4l2_required_version], [1.0.1])
51 m4_define([lua_required_version], [5.1.0])
52 m4_define([openexr_required_version], [0.0.0])
53 m4_define([libraw_required_version], [0.15.4])
54 m4_define([pango_required_version], [0.0.0])
55 m4_define([pangocairo_required_version], [0.0.0])
56 m4_define([png_required_version], [0.0.0])
57 m4_define([sdl_required_version], [0.0.0])
58 m4_define([webp_required_version], [0.0.0])
59 m4_define([poly2tri-c_required_version], [0.0.0])
61 AC_INIT(gegl, gegl_major_version.gegl_minor_version.gegl_micro_version)
63 AC_CONFIG_HEADERS([config.h])
64 AC_CONFIG_SRCDIR([gegl/gegl.h])
65 AC_CONFIG_MACRO_DIR([m4])
67 # Enable silent build rules by default, requires at least
68 # Automake-1.11. Disable by either passing --disable-silent-rules to
69 # configure or passing V=1 to make
70 m4_ifdef([AM_SILENT_RULES],
71 [AM_SILENT_RULES([yes])],
72 [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
74 dnl ==========================================================================
76 dnl ==========================================================================
79 GEGL_MAJOR_VERSION=gegl_major_version
80 GEGL_MINOR_VERSION=gegl_minor_version
81 GEGL_MICRO_VERSION=gegl_micro_version
82 GEGL_INTERFACE_AGE=gegl_interface_age
83 GEGL_BINARY_AGE=gegl_binary_age
84 GEGL_VERSION=gegl_version
85 GEGL_REAL_VERSION=gegl_real_version
86 GEGL_VERSION=gegl_version
87 GEGL_API_VERSION=gegl_api_version
88 AC_SUBST(GEGL_MAJOR_VERSION)
89 AC_SUBST(GEGL_MINOR_VERSION)
90 AC_SUBST(GEGL_MICRO_VERSION)
91 AC_SUBST(GEGL_INTERFACE_AGE)
92 AC_SUBST(GEGL_BINARY_AGE)
93 AC_SUBST(GEGL_VERSION)
94 AC_SUBST(GEGL_REAL_VERSION)
95 AC_SUBST(GEGL_API_VERSION)
97 GEGL_RELEASE=gegl_api_version
98 AC_SUBST(GEGL_RELEASE)
101 AC_DEFINE_UNQUOTED(GEGL_LIBRARY, "$PACKAGE_NAME-$GEGL_API_VERSION",
102 [The name of the GEGL library])
105 dnl The symbol GEGL_UNSTABLE is defined above for substitution in
106 dnl Makefiles and conditionally defined here as a preprocessor symbol
107 dnl and automake conditional.
108 GEGL_UNSTABLE=gegl_unstable
109 if test "x$GEGL_UNSTABLE" = "xyes"; then
110 AC_DEFINE(GEGL_UNSTABLE, 1,
111 [Define to 1 if this is an unstable version of GEGL])
113 AM_CONDITIONAL(GEGL_UNSTABLE, test "x$GEGL_UNSTABLE" = "xyes")
116 dnl libtool versioning
117 m4_define([lt_current], [m4_eval(100 * gegl_minor_version + gegl_micro_version - gegl_interface_age)])
118 m4_define([lt_revision], [gegl_interface_age])
119 m4_define([lt_age], [m4_eval(gegl_binary_age - gegl_interface_age)])
120 GEGL_LIBRARY_VERSION="lt_current:lt_revision:lt_age"
121 GEGL_CURRENT_MINUS_AGE=m4_eval(lt_current - lt_age)
122 AC_SUBST(GEGL_LIBRARY_VERSION)
123 AC_SUBST(GEGL_CURRENT_MINUS_AGE)
125 gegltargetlib=libgegl-$GEGL_API_VERSION.la
126 AC_SUBST(gegltargetlib)
128 GLIB_REQUIRED_VERSION=glib_required_version
129 AC_SUBST(GLIB_REQUIRED_VERSION)
131 LUA_REQUIRED_VERSION=lua_required_version
132 AC_SUBST(LUA_REQUIRED_VERSION)
134 dnl ==========================================================================
137 AM_INIT_AUTOMAKE([1.11 no-define dist-bzip2 no-dist-gzip -Wno-portability])
138 dnl Initialize maintainer mode
139 AM_MAINTAINER_MODE([enable])
145 dnl Prefer clang on OSX, because GCC isn't updated
148 darwin10.* | darwin9.* | darwin8.*)
152 prefered_cxx="clang++"
158 if test -z "$CC" && test -n "$prefered_cc"; then
159 AC_MSG_NOTICE([setting CC to $prefered_cc for $build_os])
163 if test -z "$CXX" && test -n "$prefered_cc"; then
164 AC_MSG_NOTICE([setting CXX to $prefered_cxx for $build_os])
168 if test -n "$CFLAGS"; then
172 if test -n "$CXXFLAGS"; then
173 user_set_cxxflags=yes
176 dnl Checks for programs.
186 if test -z $user_set_cflags; then
196 if test -z $user_set_cxxflags; then
204 dnl Large file support.
207 dnl Initialize libtool
209 LT_INIT([disable-static win32-dll dlopen])
213 AC_MSG_CHECKING([whether to turn on debugging])
215 [ --enable-debug turn on debugging (default=no)],
216 if eval "test x$enable_debug = xyes"; then
217 DEBUGFLAG="-g -DGEGL_ENABLE_DEBUG"
220 if test -n "$DEBUGFLAG"; then
222 CFLAGS="$DEBUGFLAG $CFLAGS"
227 AC_MSG_CHECKING([whether to turn on profiling])
228 AC_ARG_ENABLE(profile,
229 [ --enable-profile turn on profiling (default=no)],
230 if eval "test x$enable_profile = xyes"; then
234 if test -n "$PROFFLAG"; then
236 CFLAGS="$PROFFLAG $CFLAGS"
243 dnl disable docs generation.
244 AC_ARG_ENABLE([docs],
245 [ --disable-docs disable docs generation (default=no)],,
248 # While cross-compiling, doc generation will fail.
249 if test "$cross_compiling" = "yes" && test "x$enable_docs" = "xyes"; then
251 *** Our build system does not support doc generation in a cross-compiled environment yet.
252 Disabling doc generation.])
253 enable_docs="no (cross-compilation environment)"
256 AM_CONDITIONAL(ENABLE_DOCS, test "x$enable_docs" = "xyes")
259 dnl Cache $ACLOCAL_FLAGS
260 AC_CACHE_CHECK([for aclocal flags], ac_cv_gegl_aclocal_flags,[
261 ac_cv_gegl_aclocal_flags="$ACLOCAL_FLAGS"
263 ACLOCAL="$ACLOCAL $ac_cv_gegl_aclocal_flags"
266 ###########################
267 # Check target architecture
268 ###########################
270 AC_MSG_CHECKING([for target architecture])
273 target_or_host="$host" ;;
275 target_or_host="$target" ;;
277 AC_MSG_RESULT([$target_or_host])
279 case "$target_or_host" in
282 AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
286 AC_DEFINE(ARCH_X86, 1, [Define to 1 if you are compiling for ix86.])
287 AC_DEFINE(ARCH_X86_64, 1, [Define to 1 if you are compiling for amd64.])
291 AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
293 ppc64-*-* | powerpc64-*)
295 AC_DEFINE(ARCH_PPC, 1, [Define to 1 if you are compiling for PowerPC.])
296 AC_DEFINE(ARCH_PPC64, 1, [Define to 1 if you are compiling for PowerPC64.])
303 ####################################################
304 # Check how to generate plug-ins (with gcc at least)
305 ####################################################
307 AC_MSG_CHECKING([for dynamic library filename suffix])
308 case "$target_or_host" in
309 *-*-darwin*) # darwin
315 *-*-mingw* | *-*-cygwin*) # windows
318 *) # linux (and BSD?)
323 AC_MSG_RESULT([${shrext}])
327 AC_DEFINE_UNQUOTED(SHREXT, "$shrext", [File extension for shared libraries])
329 dnl ===========================================================================
331 #######################
332 # Check for Darwin/OSX
333 #######################
335 AC_MSG_CHECKING([for some Darwin platform])
344 AC_MSG_RESULT([$platform_darwin])
345 AM_CONDITIONAL(PLATFORM_DARWIN, test "$platform_darwin" = "yes")
352 AC_MSG_CHECKING([for some Win32 platform])
353 case "$target_or_host" in
354 *-*-mingw* | *-*-cygwin*)
361 AC_MSG_RESULT([$platform_win32])
362 AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes")
365 AC_MSG_CHECKING([for native Win32])
366 case "$target_or_host" in
377 AC_MSG_RESULT([$os_win32])
381 AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes")
382 AM_CONDITIONAL(OS_UNIX, test "$os_win32" != "yes")
384 dnl Checks for programs.
389 ########################
390 # Check for MMX assembly
391 ########################
394 [ --enable-mmx enable MMX support (default=auto)],,
395 enable_mmx=$have_x86)
398 [ --enable-sse enable SSE support (default=auto)],,
399 enable_sse=$enable_mmx)
401 if test "x$enable_mmx" = "xyes"; then
402 AS_COMPILER_FLAG([-mmmx], [MMX_EXTRA_CFLAGS="-mmmx"])
405 AC_MSG_CHECKING(whether we can compile MMX code)
407 mmx_save_CFLAGS="$CFLAGS"
408 CFLAGS="$mmx_save_CFLAGS $MMX_EXTRA_CFLAGS"
410 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("movq 0, %mm0");])],
412 AC_DEFINE(USE_MMX, 1, [Define to 1 if MMX assembly is available.])
415 if test "x$enable_sse" = "xyes"; then
416 AS_COMPILER_FLAG([-msse], [SSE_EXTRA_CFLAGS="-msse"])
417 if test "x$CC" != "xclang"; then
418 AS_COMPILER_FLAG([-ftree-vectorize], [SSE_EXTRA_CFLAGS="$SSE_EXTRA_CFLAGS -ftree-vectorize"])
420 AS_COMPILER_FLAG([-ffast-math], [SSE_EXTRA_CFLAGS="$SSE_EXTRA_CFLAGS -ffast-math"])
422 AC_MSG_CHECKING(whether we can compile SSE code)
424 sse_save_CFLAGS="$CFLAGS"
425 CFLAGS="$sse_save_CFLAGS $SSE_EXTRA_CFLAGS"
427 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[asm ("movntps %xmm0, 0");])],
428 AC_DEFINE(USE_SSE, 1, [Define to 1 if SSE assembly is available.])
433 AC_MSG_WARN([The assembler does not support the SSE command set.])
436 CFLAGS="$sse_save_CFLAGS"
441 AC_MSG_WARN([The assembler does not support the MMX command set.])
444 CFLAGS="$mmx_save_CFLAGS"
446 AC_SUBST(MMX_EXTRA_CFLAGS)
447 AC_SUBST(SSE_EXTRA_CFLAGS)
450 CFLAGS="$CFLAGS $MMX_EXTRA_CFLAGS $SSE_EXTRA_CFLAGS"
456 AC_PATH_PROGS(PERL,perl5 perl perl5.005 perl5.004,perl)
458 ########################
459 # Check GObject Introspection
460 ########################
461 GOBJECT_INTROSPECTION_CHECK(introspection_required_version)
463 ########################
465 ########################
467 PKG_CHECK_EXISTS(pygobject-2.0 >= 2.26, have_pygobject="yes")
468 PKG_CHECK_EXISTS(pygobject-3.0 >= 3.2, have_pygobject="yes")
469 AM_CONDITIONAL(HAVE_PYGOBJECT, test "$have_pygobject" = "yes")
471 ########################
473 ########################
475 AC_ARG_WITH(vala, [ --without-vala build without Vala support])
478 if test "x$with_vala" != "xno"; then
479 PKG_CHECK_EXISTS(vapigen >= 0.20.0,
481 have_vapigen="no (vapigen not found)")
484 if test "x$have_vapigen" = "xyes"; then
485 AC_PATH_PROG(VAPIGEN, vapigen, no)
486 if test "$VAPIGEN" = "no"; then
487 have_vapigen="no (vapigen executable not found)"
491 have_vala=$have_vapigen
492 AM_CONDITIONAL(HAVE_VALA, test "$have_vala" = "yes")
494 ########################
496 ########################
497 AC_CHECK_FUNCS(fsync)
499 ###############################
500 # Checks for required libraries
501 ###############################
503 PKG_CHECK_MODULES(BABL, babl >= babl_required_version)
505 GLIB_PACKAGES="gobject-2.0 gmodule-2.0 gio-2.0 json-glib-1.0"
506 # select platform-specific GIO
509 GLIB_PACKAGES="$GLIB_PACKAGES gio-windows-2.0"
512 GLIB_PACKAGES="$GLIB_PACKAGES gio-unix-2.0"
516 AC_SUBST(GLIB_PACKAGES)
518 dnl This PATH_GLIB is somewhat redundant, but does a sanity compile and
519 dnl importantly defines the GLIB_GENMARSHAL variable for subst into the
521 AM_PATH_GLIB_2_0($GLIB_REQUIRED_VERSION, :,
523 *** GLIB $GLIB_REQUIRED_VERSION or better is required. The latest version of
524 *** GLIB is always available from ftp://ftp.gtk.org/.]),
527 PKG_CHECK_MODULES(DEP,
528 glib-2.0 >= $GLIB_REQUIRED_VERSION $GLIB_PACKAGES, ,
530 *** GLib not found. You can find it on ftp://ftp.gtk.org
534 # Rerun PKG_CONFIG to add gthread-2.0 cflags and libs
535 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
536 DEP_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES gthread-2.0`
538 ######################
539 # gettext i18n support
540 ######################
542 GETTEXT_PACKAGE=gegl-$GEGL_API_VERSION
543 AC_SUBST(GETTEXT_PACKAGE)
544 AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",
545 [Our gettext translation domain.])
547 # GNU format message catalogs go into $datadir/locale,
548 # standard location is $libdir/locale. DATADIRNAME set accordingly.
550 GEGL_LOCALEDIR="$datadir/locale"
551 if test "$DATADIRNAME" = "lib"; then
552 GEGL_LOCALEDIR="$libdir/locale"
554 AC_SUBST(GEGL_LOCALEDIR)
556 # Check for bind_textdomain_codeset, including -lintl if GLib brings it in.
558 LIBS="$LIBS $GLIB_LIBS"
559 AC_CHECK_FUNCS(bind_textdomain_codeset,,
561 *** Check for bind_textdomain_codeset() failed! This is required.
565 IT_PROG_INTLTOOL(0.40.1)
570 ######################################
571 # Checks for gtk-doc and docbook-tools
572 ######################################
576 dnl NOTE: We need to use a separate automake conditional for this
577 dnl to make this work with the tarballs.
578 AM_CONDITIONAL(ENABLE_GTK_DOC, test "x$enable_gtk_doc" = "xyes")
580 AC_CHECK_PROGS(PERL, perl5 perl)
583 #######################################
584 # Checks for Ruby used to make API docs
585 #######################################
587 AC_CHECK_PROG(RUBY, ruby, yes, no)
588 if test "$RUBY" = "no"; then
590 *** Could not find Ruby interpreter. The HTML API reference
598 AM_CONDITIONAL(HAVE_RUBY, test "x$have_ruby" = "xyes")
607 AC_PATH_PROG(ENSCRIPT, enscript, no)
608 if test "$ENSCRIPT" = "no"; then
609 have_enscript="no (enscript not found)"
613 AM_CONDITIONAL(HAVE_ENSCRIPT, test "x$have_enscript" = "xyes")
620 AC_PATH_PROG(ASCIIDOC, asciidoc, no)
621 if test "$ASCIIDOC" = "no"; then
622 have_asciidoc="no (asciidoc not found)"
623 AC_MSG_RESULT([*** Check for asciidoc failed.])
627 AM_CONDITIONAL(HAVE_ASCIIDOC, test "x$have_asciidoc" = "xyes")
634 AC_PATH_PROG(DOT, dot, no)
635 if test "$DOT" = "no"; then
636 have_dot="no (dot not found)"
637 AC_MSG_RESULT([*** Check for dot command failed.])
641 AM_CONDITIONAL(HAVE_DOT, test "x$have_dot" = "xyes")
644 # Check for Python (optional, used for introspection unittests)
646 AM_PATH_PYTHON([2.5.0],, [:])
647 AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :])
653 AC_ARG_WITH(cairo, [ --without-cairo build without Cairo support])
656 if test "x$with_cairo" != "xno"; then
657 PKG_CHECK_MODULES(CAIRO, cairo,
659 have_cairo="no (Cairo not found)")
662 AM_CONDITIONAL(HAVE_CAIRO, test "$have_cairo" = "yes")
664 AC_SUBST(CAIRO_CFLAGS)
668 ########################
669 # Checks for Pango stuff
670 ########################
672 AC_ARG_WITH(pango, [ --without-pango build without Pango support])
673 AC_ARG_WITH(pangocairo, [ --without-pangocairo build without pangocairo support])
676 if test "x$with_pango" != "xno"; then
677 PKG_CHECK_MODULES(PANGO, pango,
679 have_pango="no (Pango not found)")
683 if test "x$with_pangocairo" != "xno"; then
684 PKG_CHECK_MODULES(PANGOCAIRO, pangocairo,
685 have_pangocairo="yes",
686 have_pangocairo="no (pangocairo not found)")
689 AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
690 AM_CONDITIONAL(HAVE_PANGOCAIRO, test "x$have_pangocairo" = "xyes")
692 AC_SUBST(PANGO_CFLAGS)
694 AC_SUBST(PANGOCAIRO_CFLAGS)
695 AC_SUBST(PANGOCAIRO_LIBS)
698 ######################
699 # Check for gdk-pixbuf
700 ######################
702 AC_ARG_WITH(gdk_pixbuf, [ --without-gdk-pixbuf build without gdk-pixbuf support])
705 if test "x$with_gdk_pixbuf" != "xno"; then
706 PKG_CHECK_MODULES(GDK_PIXBUF, gdk-pixbuf-2.0 >= gdk_pixbuf_required_version,
707 have_gdk_pixbuf="yes",
708 have_gdk_pixbuf="no (gdk-pixbuf not found)")
711 AM_CONDITIONAL(HAVE_GDK_PIXBUF, test "$have_gdk_pixbuf" = "yes")
718 AC_ARG_WITH(lensfun, [ --without-lensfun build without lensfun support])
721 if test "x$with_lensfun" != "xno"; then
722 PKG_CHECK_MODULES(LENSFUN, lensfun,
724 have_lensfun="no (lensfun not found)")
727 AM_CONDITIONAL(HAVE_LENSFUN, test "$have_lensfun" = "yes")
729 AC_SUBST(LENSFUN_CFLAGS)
730 AC_SUBST(LENSFUN_LIBS)
737 AC_ARG_WITH(libjpeg, [ --without-libjpeg build without JPEG support])
740 if test "x$with_libjpeg" != "xno" && test -z "$LIBJPEG"; then
741 AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,
743 jpeg_ok="no (usable JPEG library not found)")
744 if test "$jpeg_ok" = "yes"; then
745 AC_MSG_CHECKING([for jpeglib.h])
753 #include <jpeglib.h>]])],
755 [jpeg_ok="no (Can't include jpeglib.h)"])
756 AC_MSG_RESULT($jpeg_ok)
757 if test "$jpeg_ok" = "yes"; then
758 AC_CHECK_LIB(jpeg, jpeg_save_markers,
760 [jpeg_ok="no (JPEG library is too old)"])
762 jpeg_ok="no (JPEG header file not found)"
767 AM_CONDITIONAL(HAVE_JPEG, test "$jpeg_ok" = "yes")
776 AC_ARG_WITH(libpng, [ --without-libpng build without PNG support])
779 if test "x$with_libpng" != "xno"; then
780 PKG_CHECK_MODULES(PNG, libpng,
782 have_libpng="no (libpng not found)")
785 AM_CONDITIONAL(HAVE_PNG, test "$have_libpng" = "yes")
795 AC_ARG_WITH(librsvg, [ --without-librsvg build without SVG support])
798 if test "x$with_librsvg" != "xno"; then
799 PKG_CHECK_MODULES(RSVG, librsvg-2.0 >= librsvg_required_version,
801 have_librsvg="no (usable librsvg not found)")
804 AM_CONDITIONAL(HAVE_RSVG, test "$have_librsvg" = "yes")
806 AC_SUBST(RSVG_CFLAGS)
814 AC_ARG_WITH(libv4l2, [ --without-libv4l2 build without v4l2 support])
817 if test "x$with_libv4l" != "xno"; then
818 PKG_CHECK_MODULES(V4L2, libv4l2 >= libv4l2_required_version,
820 have_libv4l2="no (usable libv4l2 not found)")
823 AM_CONDITIONAL(HAVE_V4L2, test "$have_libv4l2" = "yes")
825 AC_SUBST(V4L2_CFLAGS)
833 AC_ARG_WITH(openexr, [ --without-openexr build without OpenEXR support])
836 if test "x$with_openexr" != "xno"; then
837 PKG_CHECK_MODULES(OPENEXR, OpenEXR,
839 have_openexr="no (OpenEXR library not found)")
842 AM_CONDITIONAL(HAVE_OPENEXR, test "$have_openexr" = "yes")
844 AC_SUBST(OPENEXR_CFLAGS)
845 AC_SUBST(OPENEXR_LIBS)
852 AC_ARG_WITH(sdl, [ --without-sdl build without SDL support])
855 if test "x$with_sdl" != "xno"; then
856 AC_PATH_PROG(SDL_CONFIG, sdl-config, no)
857 if test "$SDL_CONFIG" = "no"; then
858 have_sdl="no (SDL library not found)"
859 AC_MSG_RESULT([*** Check for SDL library failed.])
862 SDL_CFLAGS=`$SDL_CONFIG --cflags`
863 SDL_LIBS=`$SDL_CONFIG --libs`
867 AM_CONDITIONAL(HAVE_SDL, test "$have_sdl" = "yes")
873 AC_SUBST(OPENRAW_CFLAGS)
874 AC_SUBST(OPENRAW_LIBS)
881 AC_ARG_WITH(libraw, [ --without-libraw build without libraw support])
884 if test "x$with_libraw" != "xno"; then
885 PKG_CHECK_MODULES(LIBRAW, libraw >= libraw_required_version,
887 have_libraw="no (libraw library not found)")
890 AM_CONDITIONAL(HAVE_LIBRAW, test "$have_libraw" = "yes")
892 AC_SUBST(LIBRAW_CFLAGS)
893 AC_SUBST(LIBRAW_LIBS)
900 AC_ARG_WITH(jasper, [ --without-jasper build without Jasper support])
903 if test "x$with_jasper" != "xno"; then
904 ## Some systems have pkg-config patches in their packages (Eg, Fedora but
905 ## not Gentoo). Try this first though.
906 PKG_CHECK_MODULES(JASPER, jasper >= jasper_required_version,
908 ## For systems without pkg-config data, check for the existence of a
909 ## function introduced into the latest version (1.900.1).
910 AC_CHECK_LIB([jasper], [jas_stream_freopen], [
912 JASPER_LIBS="-ljasper"
915 have_jasper="no (jasper library not found)"
921 AM_CONDITIONAL(HAVE_JASPER, test "$have_jasper" = "yes")
923 AC_SUBST(JASPER_CFLAGS)
924 AC_SUBST(JASPER_LIBS)
931 AC_ARG_WITH(graphviz, [ --without-graphviz build without graphviz support])
934 if test "x$with_graphviz" != "xno"; then
935 AC_PATH_PROG(GRAPHVIZ, dot, no)
937 if test "$GRAPHVIZ" = "no"; then
938 have_graphviz="no (graphviz not found)"
939 AC_MSG_RESULT([*** Check for dot command from graphviz failed.])
945 AM_CONDITIONAL(HAVE_GRAPHVIZ, test "$have_graphviz" = "yes")
952 AC_ARG_WITH(lua, [ --without-lua build without Lua support])
955 if test "x$with_lua" != "xno"; then
956 PKG_CHECK_MODULES(LUA, lua >= $LUA_REQUIRED_VERSION,
958 [PKG_CHECK_MODULES(LUA, lua5.1 >= $LUA_REQUIRED_VERSION,
960 have_lua="no (usable lua not found)")])
963 AM_CONDITIONAL(HAVE_LUA, test "$have_lua" = "yes")
969 ####################################
970 # Check for libavformat / libavcodec
971 ####################################
973 AC_ARG_WITH(libavformat, [ --without-libavformat build without libavformat support])
975 if test "x$with_libavformat" != xno; then
976 PKG_CHECK_MODULES(AVFORMAT, libavformat >= 53.0.0 libavcodec >= 53.0.0,
977 have_libavformat="yes",
978 have_libavformat="no (libavformat not found)")
979 # verify the presence of the avformat.h header
980 if test "x$have_libavformat" = "xyes"; then
981 gegl_save_CPPFLAGS=$CPPFLAGS
982 CPPFLAGS="$AVFORMAT_CFLAGS $CPPFLAGS"
983 AC_CHECK_HEADER([libavformat/avformat.h],
984 AC_DEFINE(HAVE_LIBAVFORMAT_AVFORMAT_H, 1,
985 [define to 1 if avformat.h is found in libavformat]),
986 [have_libavformat="no (avformat.h not found where expected)"])
987 # on some systems the header needs to be included differently
988 if test "x$have_libavformat" != "xyes"; then
989 AC_CHECK_HEADER([avformat.h], [have_libavformat="yes"])
991 CPPFLAGS=$gegl_save_CPPFLAGS
994 have_libavformat="no (disabled)"
996 AM_CONDITIONAL(HAVE_AVFORMAT, test "x$have_libavformat" = "xyes")
1003 AC_ARG_WITH(libv4l, [ --without-libv4l build without V4L support])
1006 if test "x$with_libv4l" != "xno"; then
1007 AC_CHECK_HEADER(linux/videodev.h, have_v4l="yes")
1010 AM_CONDITIONAL(HAVE_V4L, test "$have_v4l" = "yes")
1016 AC_ARG_WITH(lcms, [ --without-lcms build without lcms support])
1018 have_lcms="no (lcms support disabled)"
1019 if test "x$with_lcms" != xno; then
1021 PKG_CHECK_MODULES(LCMS, lcms2 >= lcms_required_version,
1022 AC_DEFINE(HAVE_LCMS, 1, [Define to 1 if lcms is available])
1023 LCMS='lcms$(EXEEXT)',
1024 have_lcms="no (lcms not found or unusable)")
1028 AM_CONDITIONAL(HAVE_LCMS, test "x$have_lcms" = xyes)
1030 ####################
1031 # Check for libspiro
1032 ####################
1034 AC_ARG_WITH(libspiro, [ --without-libspiro build without SPIRO support])
1037 if test "x$with_libspiro" != "xno" && test -z "$LIBSPIRO"; then
1038 AC_CHECK_LIB(spiro, run_spiro,
1040 spiro_ok="no (usable SPIRO library not found)")
1041 if test "$spiro_ok" = "yes"; then
1042 AC_CHECK_HEADER([spiro.h],
1044 AC_DEFINE(HAVE_SPIRO, 1,
1045 [Define to 1 if the spiro library is available])
1047 spiro_ok="no (Can't include spiro.h)",
1048 [#include <bezctx_intf.h>])
1052 AM_CONDITIONAL(HAVE_SPIRO, test "$spiro_ok" = "yes")
1060 AC_ARG_WITH(exiv2, [ --without-exiv2 build without libexiv2 support])
1063 if test "x$with_libexiv2" != "xno"; then
1064 PKG_CHECK_MODULES(EXIV2, exiv2,
1066 have_exiv2="no (exiv2 library not found)")
1069 AM_CONDITIONAL(HAVE_EXIV2, test "$have_exiv2" = "yes")
1071 AC_SUBST(EXIV2_CFLAGS)
1072 AC_SUBST(EXIV2_CXXFLAGS)
1073 AC_SUBST(EXIV2_LIBS)
1079 AC_ARG_WITH(umfpack, [ --without-umfpack build without UMFPACK support])
1081 # AC_CHECK_HEADERS checks the expected locations for the umfpack header. We
1082 # would really like to set UMFPACK_CFLAGS appropriately, however there's no
1083 # readily apparent way of reliably obtaining the appropriate header directory
1084 # to add to the include list. So we rely on the automatic HAVE_<PATH> defines
1085 # and do it within the code.
1087 if test "x$with_umfpack" != "xno"; then
1088 AC_CHECK_LIB(umfpack, umfpack_dl_solve, [
1089 AC_CHECK_HEADERS([umfpack.h suitesparse/umfpack.h] , [
1091 UMFPACK_LIBS="-lumfpack"
1096 if test "x$have_umfpack" != "xyes"; then
1097 have_umfpack="no (usable umfpack library not found)"
1101 AM_CONDITIONAL(HAVE_UMFPACK, test "x$have_umfpack" = "xyes")
1102 AC_SUBST(UMFPACK_CFLAGS)
1103 AC_SUBST(UMFPACK_LIBS)
1109 AC_ARG_WITH(webp, [ --without-webp build without webp support])
1112 if test "x$with_webp" != "xno"; then
1113 PKG_CHECK_MODULES(WEBP, libwebp >= webp_required_version,
1115 have_webp="no (webp library not found)")
1118 AM_CONDITIONAL(HAVE_WEBP, test "$have_webp" = "yes")
1120 AC_SUBST(WEBP_CFLAGS)
1123 ######################
1124 # Check for poly2tri-c
1125 ######################
1128 PKG_CHECK_MODULES(P2TC, poly2tri-c >= poly2tri-c_required_version,
1130 have_p2tc="yes (internal)")
1132 AM_CONDITIONAL(HAVE_P2TC, test "$have_p2tc" = "yes")
1134 AC_SUBST(P2TC_CFLAGS)
1136 AC_SUBST(P2TC_PACKAGES, "poly2tri-c")
1138 # If no poly2tri-c version is installed, we should use the local version
1139 # we have cached in the libs directory
1140 if test "x$have_p2tc" != "xyes"; then
1141 AC_SUBST(P2TC_CFLAGS, "-I\$(top_srcdir)/libs/poly2tri-c")
1142 AC_SUBST(P2TC_LIBS, "-L\$(top_builddir)/libs/poly2tri-c/poly2tri-c -lpoly2tri-c")
1143 AC_SUBST(P2TC_PACKAGES, "")
1149 have_libnpd="yes (internal)"
1151 AC_SUBST(NPD_CFLAGS, "-I\$(top_srcdir)/libs")
1152 AC_SUBST(NPD_LIBS, "-L\$(top_builddir)/libs/npd -lgegl-npd-\$(GEGL_API_VERSION)")
1154 #######################
1155 # Check for other items
1156 #######################
1159 AC_CHECK_HEADERS([execinfo.h])
1161 # w3m is used to autogenerate README
1162 AC_PATH_PROG(W3M, w3m, no)
1163 AM_CONDITIONAL(HAVE_W3M, test "x$W3M" != "xno")
1165 dnl disable build of workshop operations.
1166 AC_ARG_ENABLE([workshop],
1167 [ --enable-workshop enable build of workshop operations (default=no)],,
1168 enable_workshop="no")
1170 AM_CONDITIONAL(ENABLE_WORKSHOP, test "x$enable_workshop" = "xyes")
1173 AC_CHECK_FUNC(rint, AC_DEFINE(HAVE_RINT, 1,
1174 [Define to 1 if you have the rint function.]), [
1175 AC_CHECK_LIB(m, rint, [AC_DEFINE(HAVE_RINT)])])
1178 #######################
1179 # Enable extra warnings
1180 #######################
1183 DESIRED_CFLAGS="-Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition"
1186 # DESIRED_CFLAGS+="-fdiagnostics-show-option -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wundef -Wformat=2 -Wlogical-op -Wmissing-include-dirs -Wformat-nonliteral -Wnested-externs -Wpacked -Wno-long-long -Wno-overlength-strings -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wwrite-strings -Wp,-D_FORTIFY_SOURCE=2 -fno-common"
1189 # DESIRED_CFLAGS+="-Wfloat-equal -Waggregate-return -Wredundant-decls $DESIRED_CFLAGS"
1191 #if test -z "${MAINTAINER_MODE_TRUE}"; then
1192 # DESIRED_CFLAGS="-Werror $DESIRED_CFLAGS"
1195 for flag in $DESIRED_CFLAGS; do
1196 AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
1199 # We should support this at some point if possible
1200 #LDFLAGS="-Wl,-z,defs"
1202 CFLAGS="$CFLAGS -DG_LOG_DOMAIN=\\\"GEGL-\\\"__FILE__"
1204 dnl bin/node-editors/Makefile
1210 gegl/buffer/Makefile
1212 gegl/module/Makefile
1213 gegl/operation/Makefile
1214 gegl/process/Makefile
1215 gegl/property-types/Makefile
1216 gegl/opencl/Makefile
1220 libs/poly2tri-c/Makefile
1221 libs/poly2tri-c/poly2tri-c/Makefile
1222 libs/poly2tri-c/poly2tri-c/render/Makefile
1223 libs/poly2tri-c/poly2tri-c/p2t/sweep/Makefile
1224 libs/poly2tri-c/poly2tri-c/p2t/common/Makefile
1225 libs/poly2tri-c/poly2tri-c/p2t/Makefile
1226 libs/poly2tri-c/poly2tri-c/refine/Makefile
1227 seamless-clone/Makefile
1229 operations/core/Makefile
1230 operations/json/Makefile
1231 operations/common/Makefile
1232 operations/common/perlin/Makefile
1233 operations/seamless-clone/Makefile
1234 operations/external/Makefile
1235 operations/generated/Makefile
1236 operations/transform/Makefile
1237 operations/workshop/Makefile
1238 operations/workshop/external/Makefile
1239 operations/workshop/generated/Makefile
1243 docs/hello-world.txt
1246 examples/data/Makefile
1248 tests/buffer/Makefile
1249 tests/buffer/reference/Makefile
1250 tests/buffer/tests/Makefile
1251 tests/compositions/Makefile
1252 tests/compositions/data/Makefile
1253 tests/python/Makefile
1254 tests/simple/Makefile
1256 tests/xml/data/Makefile
1263 # Files with versions in their names
1265 gegl-gegl_api_version.pc:gegl.pc.in
1266 gegl/gegl-gegl_api_version.deps:gegl/gegl.deps.in
1267 gegl/Gegl-gegl_api_version.metadata:gegl/Gegl.metadata.in
1268 seamless-clone/gegl-sc-gegl_api_version.pc:seamless-clone/gegl-sc.pc.in
1273 dnl Print a summary of features enabled/disabled:
1275 Building GEGL with prefix=$prefix
1278 GEGL docs: $enable_docs
1279 Build workshop: $enable_workshop
1280 Build website: $have_asciidoc
1281 SIMD: sse:$enable_sse mmx:$enable_mmx
1282 Vala support: $have_vala
1284 Optional dependencies:
1285 asciidoc: $have_asciidoc
1286 enscript: $have_enscript
1291 pangocairo: $have_pangocairo
1292 GDKPixbuf: $have_gdk_pixbuf
1295 OpenEXR: $have_openexr
1298 libraw: $have_libraw
1299 Jasper: $have_jasper
1300 graphviz: $have_graphviz
1301 avformat: $have_libavformat
1306 umfpack: $have_umfpack
1308 poly2tri-c: $have_p2tc