[cairo] [PATCH 2/4] Protect code using dlfcn.h with CAIRO_HAS_DLSYM

Maarten Bosmans mkbosmans at gmail.com
Mon Apr 9 12:33:50 PDT 2012


---
 configure.ac     |    1 +
 util/Makefile.am |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index cedfebe..5d2e6ec 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,7 @@ AM_CONDITIONAL(CAIRO_HAS_DL, test "x$have_dl" = "xyes")
 if test "x$have_dlsym" = "xyes"; then
   AC_DEFINE([CAIRO_HAS_DLSYM], 1, [Define to 1 if dlsym is available])
 fi
+AM_CONDITIONAL(CAIRO_HAS_DLSYM, test "x$have_dlsym" = "xyes")
 
 dnl ===========================================================================
 
diff --git a/util/Makefile.am b/util/Makefile.am
index f202f35..82d0a80 100644
--- a/util/Makefile.am
+++ b/util/Makefile.am
@@ -12,20 +12,24 @@ endif
 
 if CAIRO_HAS_TRACE
 SUBDIRS += cairo-trace
+if CAIRO_HAS_DLSYM
 if CAIRO_HAS_SCRIPT_SURFACE
 if CAIRO_HAS_TEE_SURFACE
 SUBDIRS += cairo-fdr
 endif
 endif
 endif
+endif
 
 if BUILD_SPHINX
+if CAIRO_HAS_DLSYM
 if CAIRO_HAS_SCRIPT_SURFACE
 if CAIRO_HAS_TEE_SURFACE
 SUBDIRS += cairo-sphinx
 endif
 endif
 endif
+endif
 
 AM_CPPFLAGS = -I$(top_srcdir)/src \
 	      -I$(top_builddir)/src \
-- 
1.7.7



More information about the cairo mailing list