[cairo-commit] boilerplate/Makefile.win32.features build/configure.ac.features build/Makefile.win32.features build/Makefile.win32.features-h configure.ac src/Makefile.win32.features util/cairo-trace

Chris Wilson ickle at kemper.freedesktop.org
Sun Sep 13 02:54:38 PDT 2009


 boilerplate/Makefile.win32.features |    7 +++++++
 build/Makefile.win32.features       |    1 +
 build/Makefile.win32.features-h     |    3 +++
 build/configure.ac.features         |    1 +
 configure.ac                        |    6 ++++++
 src/Makefile.win32.features         |    7 +++++++
 util/cairo-trace/Makefile.am        |   14 +++++++++-----
 7 files changed, 34 insertions(+), 5 deletions(-)

New commits:
commit 6cb3ff9c1943c58f5b6892af3f18f6aaa24494b6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Sep 13 10:52:14 2009 +0100

    [configure] --enable-symbol-lookup
    
    There you go Joonas, I don't always ignore your suggestions! This is
    simple patch to allow the user to disable symbol loops in case the
    auto-detection fails on some obscure (perhaps OpenBSD) platform. Or in
    case the user really wants to trim a few bytes from a library only used
    during tracing!

diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index ee45b08..3e922ef 100644
--- a/boilerplate/Makefile.win32.features
+++ b/boilerplate/Makefile.win32.features
@@ -361,3 +361,10 @@ ifeq ($(CAIRO_HAS_INTERPRETER),1)
 enabled_cairo_boilerplate_private += $(cairo_boilerplate_interpreter_private) $(cairo_boilerplate_interpreter_headers)
 enabled_cairo_boilerplate_sources += $(cairo_boilerplate_interpreter_sources)
 endif
+
+all_cairo_boilerplate_private += $(cairo_boilerplate_symbol_lookup_private) $(cairo_boilerplate_symbol_lookup_headers)
+all_cairo_boilerplate_sources += $(cairo_boilerplate_symbol_lookup_sources)
+ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
+enabled_cairo_boilerplate_private += $(cairo_boilerplate_symbol_lookup_private) $(cairo_boilerplate_symbol_lookup_headers)
+enabled_cairo_boilerplate_sources += $(cairo_boilerplate_symbol_lookup_sources)
+endif
diff --git a/build/Makefile.win32.features b/build/Makefile.win32.features
index af88c95..18293b2 100644
--- a/build/Makefile.win32.features
+++ b/build/Makefile.win32.features
@@ -32,3 +32,4 @@ CAIRO_HAS_TEST_SURFACES=0
 CAIRO_HAS_XML_SURFACE=1
 CAIRO_HAS_TRACE=1
 CAIRO_HAS_INTERPRETER=1
+CAIRO_HAS_SYMBOL_LOOKUP=1
diff --git a/build/Makefile.win32.features-h b/build/Makefile.win32.features-h
index 1807aee..8585498 100644
--- a/build/Makefile.win32.features-h
+++ b/build/Makefile.win32.features-h
@@ -105,4 +105,7 @@ endif
 ifeq ($(CAIRO_HAS_INTERPRETER),1)
 	@echo "#define CAIRO_HAS_INTERPRETER 1" >> src/cairo-features.h
 endif
+ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
+	@echo "#define CAIRO_HAS_SYMBOL_LOOKUP 1" >> src/cairo-features.h
+endif
 	@echo "#endif" >>  src/cairo-features.h
diff --git a/build/configure.ac.features b/build/configure.ac.features
index afa576a..baf8848 100644
--- a/build/configure.ac.features
+++ b/build/configure.ac.features
@@ -400,6 +400,7 @@ AC_DEFUN([CAIRO_REPORT],
 	echo "And the following internal features:"
 	echo "  gtk-doc:       $enable_gtk_doc"
 	echo "  gcov support:  $use_gcov"
+	echo "  symbol-lookup: $use_symbol_lookup"
 	echo "  test surfaces: $use_test_surfaces"
 	echo "  ps testing:    $test_ps"
 	echo "  pdf testing:   $test_pdf"
diff --git a/configure.ac b/configure.ac
index cb06481..bc1d384 100644
--- a/configure.ac
+++ b/configure.ac
@@ -668,6 +668,12 @@ if test "x$have_bfd" = "xyes"; then
     AC_SUBST(BFD_LIBS)
 fi
 
+CAIRO_ENABLE(symbol_lookup, symbol-lookup, yes, [
+	if test "x$have_bfd" != "xyes"; then
+		use_symbol_lookup="no (requires bfd)"
+	fi
+])
+
 PKG_CHECK_MODULES(glib, glib-2.0, have_glib=yes, have_glib=no)
 AC_SUBST(glib_CFLAGS)
 AC_SUBST(glib_LIBS)
diff --git a/src/Makefile.win32.features b/src/Makefile.win32.features
index b1c81c3..4e55642 100644
--- a/src/Makefile.win32.features
+++ b/src/Makefile.win32.features
@@ -479,3 +479,10 @@ ifeq ($(CAIRO_HAS_INTERPRETER),1)
 enabled_cairo_private += $(cairo_interpreter_private) $(cairo_interpreter_headers)
 enabled_cairo_sources += $(cairo_interpreter_sources)
 endif
+
+all_cairo_private += $(cairo_symbol_lookup_private) $(cairo_symbol_lookup_headers)
+all_cairo_sources += $(cairo_symbol_lookup_sources)
+ifeq ($(CAIRO_HAS_SYMBOL_LOOKUP),1)
+enabled_cairo_private += $(cairo_symbol_lookup_private) $(cairo_symbol_lookup_headers)
+enabled_cairo_sources += $(cairo_symbol_lookup_sources)
+endif
diff --git a/util/cairo-trace/Makefile.am b/util/cairo-trace/Makefile.am
index 6da0267..7e2f66e 100644
--- a/util/cairo-trace/Makefile.am
+++ b/util/cairo-trace/Makefile.am
@@ -7,15 +7,19 @@ cairolib_LTLIBRARIES = cairo-trace.la
 AM_CPPFLAGS = -I$(top_srcdir)/src \
 	      -I$(top_builddir)/src
 
-cairo_trace_la_SOURCES = \
-			 lookup-symbol.c \
-			 lookup-symbol.h \
-			 trace.c
+cairo_trace_la_SOURCES = trace.c
 cairo_trace_la_CPPFLAGS = -DCAIRO_TRACE_OUTDIR="\"$(cairooutdir)\"" \
 			  $(AM_CPPFLAGS)
 cairo_trace_la_CFLAGS = $(CAIRO_CFLAGS)
 cairo_trace_la_LDFLAGS = -module -no-undefined
-cairo_trace_la_LIBADD = -ldl -lz $(BFD_LIBS)
+cairo_trace_la_LIBADD = -ldl -lz
+
+if CAIRO_HAS_SYMBOL_LOOKUP
+cairo_trace_la_SOURCES += \
+			 lookup-symbol.c \
+			 lookup-symbol.h
+cairo_trace_la_LIBADD += $(BFD_LIBS)
+endif
 
 
 system-install: install


More information about the cairo-commit mailing list