summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-09 12:29:35 +0200
committerBenjamin Otte <otte@redhat.com>2010-07-09 12:38:37 +0200
commitf7fc8569a797356d5e93ad67aae4eca31e6835cd (patch)
tree21ceb22b081dfb45f9e533ccdf861d60fe1a6251 /configure.ac
parentdf6d49f6eaf334d5a2de8bdd90919278071ab868 (diff)
build: Fix C++ issues with automake
This is an attempt to fix the broken situation we've been in where automake links libcairo.la with c++ because it might potentially maybe include C++ files. Those potential files only exist in Chris' throwaway backends (skia, qt) and the BeOS backend, so for 99.99% of cases, these backends are not needed and linking with c++ is overkill. Also, no one wants to have libcairo.so link to libstdc++. This patch fixes that in mutliple steps: 1) Add build infrastructure to distinguish between C and C++ backends. This is done by allowing to specify backend_sources as well as backend_cxx_sources variables in Makefile.sources. 2) Optionally build a libcairo_cxx.la noinst library This intermediate library is built for C++ backends only and therefor linked using c++. It is then linked into the final libcairo.la. This does not require c++, so the linking of libcairo.la is done with cc. This also works around various weirdnesses that the current build system exposes, where it assumes cisms when in fact using c++ semantics, like not detecting c++ properly or: https://bugzilla.redhat.com/show_bug.cgi?id=606523
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8d2c00731..cb32d7c98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -777,6 +777,16 @@ fi
dnl ===========================================================================
+dnl Extra stuff we need to do when building C++ code
+need_cxx="no"
+AS_IF([test "x$use_skia" = "xyes"], [need_cxx="yes"])
+AS_IF([test "x$use_qt" = "xyes"], [need_cxx="yes"])
+AS_IF([test "x$use_beos" = "xyes"], [need_cxx="yes"])
+
+AM_CONDITIONAL(BUILD_CXX, test "x$need_cxx" = "xyes")
+
+dnl ===========================================================================
+
# We use GTK+ for some utility/debugging tools
PKG_CHECK_MODULES(gtk, "gtk+-2.0",have_gtk=yes, have_gtk=no)
AM_CONDITIONAL(HAVE_GTK, test "x$have_gtk" = "xyes")