summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-13 10:52:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-09-13 10:52:14 +0100
commit6cb3ff9c1943c58f5b6892af3f18f6aaa24494b6 (patch)
tree07ae950132347ccad6a27148a651e826f0688ee7
parent556d064f4eb3625022f0d99461929ff3fafc9c71 (diff)
[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!
-rw-r--r--boilerplate/Makefile.win32.features7
-rw-r--r--build/Makefile.win32.features1
-rw-r--r--build/Makefile.win32.features-h3
-rw-r--r--build/configure.ac.features1
-rw-r--r--configure.ac6
-rw-r--r--src/Makefile.win32.features7
-rw-r--r--util/cairo-trace/Makefile.am14
7 files changed, 34 insertions, 5 deletions
diff --git a/boilerplate/Makefile.win32.features b/boilerplate/Makefile.win32.features
index ee45b084..3e922efb 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 af88c951..18293b22 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 1807aee9..8585498a 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 afa576a4..baf88483 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 cb064813..bc1d3840 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 b1c81c3c..4e55642d 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 6da0267e..7e2f66e6 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