[gegl] Allow GEGL to be built without poly2tri-c, disabling the seamless clone op



commit af3639ac6e07607344dacbe98b30114dd96d7b24
Author: Barak Itkin <lightningismyname gmail com>
Date:   Fri Jul 20 18:06:03 2012 +0300

    Allow GEGL to be built without poly2tri-c, disabling the seamless clone op

 configure.ac                                 |   27 ++++++++++++++++++-------
 operations/common/seamless-clone/Makefile.am |    2 +
 2 files changed, 21 insertions(+), 8 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8955f87..98dc692 100644
--- a/configure.ac
+++ b/configure.ac
@@ -460,14 +460,6 @@ PKG_CHECK_MODULES(DEP,
 DEP_CFLAGS=`$PKG_CONFIG --cflags $GLIB_PACKAGES gthread-2.0`
 DEP_LIBS=`$PKG_CONFIG --libs $GLIB_PACKAGES gthread-2.0`
 
-
-PKG_CHECK_MODULES(P2TC,
-                  poly2tri-c >= poly2tri-c_required_version, ,
-                  AC_MSG_ERROR([
-        *** Poly2tri-C not found. You can find it on http://code.google.com/p/poly2tri-c/
-        *** Errors follow:
-            $P2TC_PKG_ERRORS]))
-
 ######################
 # gettext i18n support
 ######################
@@ -1023,6 +1015,24 @@ AM_CONDITIONAL(HAVE_UMFPACK, test "x$have_umfpack" = "xyes")
 AC_SUBST(UMFPACK_CFLAGS)
 AC_SUBST(UMFPACK_LIBS)
 
+######################
+# Check for poly2tri-c
+######################
+
+AC_ARG_WITH(p2tc, AS_HELP_STRING([--without-p2tc], [build without poly2tri-c support]))
+
+have_p2tc="no"
+if test "x$with_p2tc" != "xno"; then
+  PKG_CHECK_MODULES(P2TC, poly2tri-c >= poly2tri-c_required_version,
+    have_p2tc="yes",
+    have_p2tc="no  (poly2tri-c not found)")
+fi
+
+AM_CONDITIONAL(HAVE_P2TC, test "$have_p2tc" = "yes")
+
+AC_SUBST(P2TC_CFLAGS)
+AC_SUBST(P2TC_LIBS)
+
 #######################
 # Check for other items
 #######################
@@ -1163,4 +1173,5 @@ Optional dependencies:
   spiro:           $spiro_ok
   EXIV:            $have_exiv2
   umfpack:         $have_umfpack
+  poly2tri-c:      $have_p2tc
 ]);
diff --git a/operations/common/seamless-clone/Makefile.am b/operations/common/seamless-clone/Makefile.am
index 96820b1..144a61e 100644
--- a/operations/common/seamless-clone/Makefile.am
+++ b/operations/common/seamless-clone/Makefile.am
@@ -17,4 +17,6 @@ seamless_clone_prepare_la_SOURCES = seamless-clone-prepare.c $(sc_common_files)
 
 opdir = $(libdir)/gegl- GEGL_API_VERSION@
 
+if HAVE_P2TC
 op_LTLIBRARIES = seamless-clone.la seamless-clone-render.la seamless-clone-prepare.la
+endif


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]