Made Tests Optional to Allow Older glib
Debian Stable had old Glib, only used for gtest, so made it optional.
--- a/Makefile.am Tue Feb 24 15:34:31 2009 -0800
+++ b/Makefile.am Tue Feb 24 16:51:25 2009 -0800
@@ -1,6 +1,7 @@
include $(top_srcdir)/build/Makefile.am.lm
-SUBDIRS = loudmouth docs examples tests
+SUBDIRS = loudmouth docs examples $(TEST_DIRS)
+DIST_SUBDIRS = loudmouth docs examples tests
EXTRA_DIST += \
loudmouth-1.0.pc.in \
--- a/README Tue Feb 24 15:34:31 2009 -0800
+++ b/README Tue Feb 24 16:51:25 2009 -0800
@@ -14,12 +14,15 @@
Requirements:
=============
-Glib >= 2.16.0:
+Glib >= 2.12.4:
http://ftp.gnome.org/pub/GNOME/sources/glib/2.16/
gtk-doc (optional, if you want documentation built):
ftp://ftp.gnome.org/pub/GNOME/sources/gtk-doc/1.0
+If you want our unit tests through the g_test framework:
+Glib >= 2.16.0
+
If you want SSL-support you'll also need:
GnuTLS >= 1.2.0 with libtasn support.
--- a/configure.ac Tue Feb 24 15:34:31 2009 -0800
+++ b/configure.ac Tue Feb 24 16:51:25 2009 -0800
@@ -79,7 +79,8 @@
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
-GLIB2_REQUIRED=2.16.0
+GLIB2_REQUIRED=2.12.4
+GLIB2_TEST_REQUIRED=2.16.0
GNUTLS_REQUIRED=1.4.0
LIBTASN1_REQUIRED=0.2.6
@@ -93,6 +94,16 @@
glib-2.0 >= $GLIB2_REQUIRED
gobject-2.0 >= $GLIB2_REQUIRED)
+PKG_CHECK_MODULES(LOUDMOUTHTEST,
+ glib-2.0 >= $GLIB2_TEST_REQUIRED,
+ enable_test=yes, enable_test=no)
+if test "$enable_test" = yes; then
+ TEST_DIRS=tests
+else
+ TEST_DIRS=
+fi
+AC_SUBST([TEST_DIRS])
+
PKG_CHECK_MODULES(LIBIDN, libidn, have_idn=yes, have_idn=no)
if test "x$have_idn" = "xyes"; then
AC_DEFINE(HAVE_IDN, 1, [Define if IDN support is included])
@@ -297,7 +308,8 @@
Linux TCP keepalives: ${use_keepalives}
Enable Debug: ${enable_debug}
Enable GSSAPI: ${enable_gssapi}
- Enable Documentation ${enable_gtk_doc}
+ Enable Documentation: ${enable_gtk_doc}
+ Enable Tests: ${enable_test}
Now type 'make' to build Loudmouth
"