summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac17
-rw-r--r--pixman/Makefile.am3
2 files changed, 20 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 529ed0a..fe62bef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -754,6 +754,23 @@ fi
AC_SUBST(TESTPROGS_EXTRA_LDFLAGS)
dnl ==============================================
+dnl Force compilation of pixman library in C++ mode (for testing/debugging)
+
+AC_ARG_ENABLE(enforced-cplusplus,
+ [AC_HELP_STRING([--enable-enforced-cplusplus],
+ [unsupported C++ test build [default=no]])],
+ [enable_enforced_cplusplus=$enableval], [enable_enforced_cplusplus=no])
+
+PIXMAN_EXTRA_CPPFLAGS=
+PIXMAN_EXTRA_CCASFLAGS=
+if test "x$enable_enforced_cplusplus" = "xyes" ; then
+ PIXMAN_EXTRA_CPPFLAGS="$PIXMAN_EXTRA_CPPFLAGS -xc++"
+ PIXMAN_EXTRA_CCASFLAGS="$PIXMAN_EXTRA_CCASFLAGS -xnone"
+fi
+AC_SUBST(PIXMAN_EXTRA_CPPFLAGS)
+AC_SUBST(PIXMAN_EXTRA_CCASFLAGS)
+
+dnl ==============================================
dnl Timers
AC_ARG_ENABLE(timers,
diff --git a/pixman/Makefile.am b/pixman/Makefile.am
index cbed085..6b654fe 100644
--- a/pixman/Makefile.am
+++ b/pixman/Makefile.am
@@ -1,5 +1,8 @@
include $(top_srcdir)/pixman/Makefile.sources
+AM_CPPFLAGS = $(PIXMAN_EXTRA_CPPFLAGS)
+AM_CCASFLAGS = $(PIXMAN_EXTRA_CCASFLAGS)
+
lib_LTLIBRARIES = libpixman-1.la
libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@