diff options
author | Colin Walters <walters@verbum.org> | 2010-04-18 15:46:38 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2010-04-18 15:46:38 -0400 |
commit | d97145aa22544203ecb056772eb141b66776a4db (patch) | |
tree | a4af7d5facfadc5408190a5aaaa594bd2f29c6b4 | |
parent | 620f705e68b38d52631366706ed85ed45da5228d (diff) | |
download | gobject-introspection-d97145aa22544203ecb056772eb141b66776a4db.tar.gz |
Add --disable-tests configure flag
This allows us to not hard depend on cairo.
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | gir/Makefile.am | 3 |
2 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index c8097002..b9d2b895 100644 --- a/configure.ac +++ b/configure.ac @@ -125,6 +125,15 @@ PKG_CHECK_MODULES(GTHREAD, [gthread-2.0]) PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0], have_gio_unix=true, have_gio_unix=false) AM_CONDITIONAL(HAVE_GIO_UNIX, test x$have_gio_unix = xtrue) +AC_ARG_ENABLE(tests,[ --disable-tests disable test libraries ], enable_tests=$enableval,enable_tests=yes) +if test x$enable_tests != xno; then + PKG_CHECK_MODULES(CAIRO, [cairo], have_cairo=yes, have_cairo=no) + if test x$have_cairo != xyes; then + AC_MSG_ERROR([Tests enabled but cairo not found; pass --disable-tests or install cairo]) + fi +fi +AM_CONDITIONAL(BUILD_TESTS, test x$enable_tests != xno) + PKG_CHECK_MODULES(SCANNER, [gobject-2.0 gthread-2.0 gio-2.0]) dnl libffi diff --git a/gir/Makefile.am b/gir/Makefile.am index 24e76752..dc3f2c4a 100644 --- a/gir/Makefile.am +++ b/gir/Makefile.am @@ -167,6 +167,7 @@ if OS_WIN32 libgirepository_everything_1_0_la_LDFLAGS += -no-undefined endif +if BUILD_TESTS Everything-1.0.gir: Gio-2.0.gir libgirepository-everything-1.0.la Everything_1_0_gir_LIBS = libgirepository-everything-1.0.la @@ -198,6 +199,8 @@ GIMarshallingTests_1_0_gir_FILES = $(srcdir)/gimarshallingtests.h $(srcdir)/gima INTROSPECTION_GIRS += GIMarshallingTests-$(TYPELIB_VERSION).gir +endif + # Generic rules CLEANFILES += $(INTROSPECTION_GIRS) |