Skip to content

Commit

Permalink
Made Tests Optional to Allow Older glib
Browse files Browse the repository at this point in the history
Debian Stable had old Glib, only used for gtest, so made it optional.
  • Loading branch information
Jayson Vantuyl committed Feb 25, 2009
1 parent 6fcb1f3 commit 1f247a3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
3 changes: 2 additions & 1 deletion Makefile.am
@@ -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 \
Expand Down
5 changes: 4 additions & 1 deletion README
Expand Up @@ -14,12 +14,15 @@ feedback I would be most grateful.
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.

Expand Down
16 changes: 14 additions & 2 deletions configure.ac
Expand Up @@ -79,7 +79,8 @@ changequote([,])dnl
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

Expand All @@ -93,6 +94,16 @@ PKG_CHECK_MODULES(LOUDMOUTH,
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])
Expand Down Expand Up @@ -297,7 +308,8 @@ echo "
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
"
Expand Down

0 comments on commit 1f247a3

Please sign in to comment.