]> granicus.if.org Git - graphviz/commitdiff
add explicit check to cairo lib dependencies untagged-bb1d11353d7e8ae2f2a4
authorJohn Ellson <john.ellson@comcast.net>
Sun, 4 Dec 2016 15:38:19 +0000 (10:38 -0500)
committerJohn Ellson <john.ellson@comcast.net>
Sun, 4 Dec 2016 15:38:19 +0000 (10:38 -0500)
configure.ac
plugin/rsvg/Makefile.am

index 3584ed570c939aa9bef9f04944a3b491995ea6c6..e563ac4c010f940e7f95571539b5d23dc73af3fc 100644 (file)
@@ -2160,7 +2160,30 @@ fi
 AM_CONDITIONAL(WITH_VISIO, [test "x$use_visio" = "xYes"])
 
 dnl -----------------------------------
-dnl INCLUDES and LIBS for PANGO, CAIRO et.al.
+dnl INCLUDES and LIBS for CAIRO
+                                                                                
+AC_ARG_WITH(cairo,
+  [AS_HELP_STRING([--with-cairo=yes],[cairo library])],
+  [], [with_cairo=yes])
+
+if test "x$with_cairo" != "xyes"; then
+  use_cairo="No (disabled)"
+else
+  # require at least the version available on centos5 (fc6 has 1.14.10)
+  PKG_CHECK_MODULES(CAIRO, [cairo >= 1.14.9],[
+    use_cairo="Yes"
+    AC_DEFINE_UNQUOTED(HAVE_CAIRO,1,
+      [Define if you have the cairo library])
+    AC_SUBST([CAIRO_CFLAGS])
+    AC_SUBST([CAIRO_LIBS])
+  ],[
+    use_cairo="No (cairo library not available)"
+  ])
+fi
+AM_CONDITIONAL(WITH_CAIRO, [test "x$use_cairo" = "xYes"])
+
+dnl -----------------------------------
+dnl INCLUDES and LIBS for PANGO
                                                                                 
 AC_ARG_WITH(pangocairo,
   [AS_HELP_STRING([--with-pangocairo=yes],[pangocairo library])],
@@ -2169,16 +2192,20 @@ AC_ARG_WITH(pangocairo,
 if test "x$with_pangocairo" != "xyes"; then
   use_pangocairo="No (disabled)"
 else
-  # require at least the version available on centos5 (fc6 has 1.14.10)
-  PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 1.14.9],[
-    use_pangocairo="Yes"
-    AC_DEFINE_UNQUOTED(HAVE_PANGOCAIRO,1,
-      [Define if you have the pangocairo library])
-    AC_SUBST([PANGOCAIRO_CFLAGS])
-    AC_SUBST([PANGOCAIRO_LIBS])
-  ],[
-    use_pangocairo="No (pangocairo library not available)"
-  ])
+  if test "x$use_cairo" != "xYes"; then
+    use_pangocairo="No (missing cairo support)"
+  else
+    # require at least the version available on centos5 (fc6 has 1.14.10)
+    PKG_CHECK_MODULES(PANGOCAIRO, [pangocairo >= 1.14.9],[
+      use_pangocairo="Yes"
+      AC_DEFINE_UNQUOTED(HAVE_PANGOCAIRO,1,
+        [Define if you have the pangocairo library])
+      AC_SUBST([PANGOCAIRO_CFLAGS])
+      AC_SUBST([PANGOCAIRO_LIBS])
+    ],[
+      use_pangocairo="No (pangocairo library not available)"
+    ])
+  fi
 fi
 AM_CONDITIONAL(WITH_PANGOCAIRO, [test "x$use_pangocairo" = "xYes"])
 
index f986270b23d06db54e146fc18101f2d43e347367..510b10504fa00cfd77632a9a42754f1b27053ff3 100644 (file)
@@ -8,7 +8,7 @@ AM_CPPFLAGS = \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/cgraph \
        -I$(top_srcdir)/lib/cdt \
-       $(RSVG_CFLAGS) $(PANGOCAIRO_CFLAGS)
+       $(RSVG_CFLAGS) $(PANGOCAIRO_CFLAGS) $(CAIRO_CFLAGS)
 
 if WITH_RSVG
 noinst_LTLIBRARIES = libgvplugin_rsvg_C.la
@@ -26,7 +26,7 @@ libgvplugin_rsvg_C_la_SOURCES = \
 libgvplugin_rsvg_la_LDFLAGS = -version-info @GVPLUGIN_VERSION_INFO@
 libgvplugin_rsvg_la_SOURCES = $(libgvplugin_rsvg_C_la_SOURCES)
 libgvplugin_rsvg_la_LIBADD = \
-       $(top_builddir)/lib/gvc/libgvc.la @RSVG_LIBS@ @PANGOCAIRO_LIBS@
+       $(top_builddir)/lib/gvc/libgvc.la @RSVG_LIBS@ @PANGOCAIRO_LIBS@ @CAIRO_LIBS@
 
 if WITH_WIN32
 libgvplugin_rsvg_la_LDFLAGS += -no-undefined