Dear all,
Currently, the testing code depends on g_test_fail which was only
introduced in glib 2.30. This means that the harfbuzz build now depends
on glib 2.30 was is not necessary for regular harfbuzz.
One solution, would be checking the existence of this function or
checking that the glib version is new enough, and only then build the
testing code. I opted for the more specific solution - letting people
disable building the tests.
Many people don't care about the tests anyway, so allowing to disable
them is probably a good idea anyway.
Currently, just to keep behaviour, I made test building on by default
(tbh, I think it should be off by default) and people can disable them
using --disable-tests.
Attached is a patch to implement the described behaviour.
--
Tom.
>From 8f286ff042b57e0fa37b1c0e42f6ff2a70374258 Mon Sep 17 00:00:00 2001
From: Tom 'TAsn' Hacohen <[email protected]>
Date: Wed, 20 Jul 2011 12:34:40 +0300
Subject: [PATCH] Added --disable-tests for disabling building of tests.
---
Makefile.am | 6 +++++-
configure.ac | 16 ++++++++++++++++
2 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index bb68ede..cc60edc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,11 @@
NULL =
-SUBDIRS = src test
+SUBDIRS = src
+
+if WANT_TESTS
+SUBDIRS += test
+endif
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = harfbuzz.pc
diff --git a/configure.ac b/configure.ac
index d2a2331..a4538b8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -133,6 +133,22 @@ AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype)
dnl ===========================================================================
+want_tests="yes"
+AC_ARG_ENABLE([tests],
+ AC_HELP_STRING([--disable-tests],
+ [disable building tests. @<:@default=enabled@:>@]),
+ [
+ if test "x${enableval}" = "xyes" ; then
+ want_tests="yes"
+ else
+ want_tests="no"
+ fi
+ ])
+
+AM_CONDITIONAL(WANT_TESTS, test "x${want_tests}" = "xyes")
+
+dnl ===========================================================================
+
AC_CONFIG_FILES([
Makefile
harfbuzz.pc
--
1.7.0.4
_______________________________________________
HarfBuzz mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/harfbuzz