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 /configure.ac | |
parent | 620f705e68b38d52631366706ed85ed45da5228d (diff) | |
download | gobject-introspection-d97145aa22544203ecb056772eb141b66776a4db.tar.gz |
Add --disable-tests configure flag
This allows us to not hard depend on cairo.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 9 |
1 files changed, 9 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 |