summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2013-06-23 20:22:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2013-06-23 20:22:35 -0400
commit8ec55ff29e0626a05a3aa9d92060e28767ee142f (patch)
treeb68208244a2031fbdae1cc32cdc005cf2c379a26 /m4
parent948b5cfcd4ab112050d801d1a05eeb9260591d53 (diff)
downloadgdk-pixbuf-8ec55ff29e0626a05a3aa9d92060e28767ee142f.tar.gz
Use GLib test setup for installed tests
Diffstat (limited to 'm4')
-rw-r--r--m4/.gitignore3
-rw-r--r--m4/glibtests.m428
2 files changed, 30 insertions, 1 deletions
diff --git a/m4/.gitignore b/m4/.gitignore
index eedbbdc89..78d4f1ce8 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -1,3 +1,4 @@
*.m4
-# We maintain this file in our tree
+# We maintain these files in our tree
!introspection.m4
+!glibtests.m4
diff --git a/m4/glibtests.m4 b/m4/glibtests.m4
new file mode 100644
index 000000000..27e902466
--- /dev/null
+++ b/m4/glibtests.m4
@@ -0,0 +1,28 @@
+dnl GLIB_TESTS
+dnl
+
+AC_DEFUN([GLIB_TESTS],
+[
+ AC_ARG_ENABLE(installed-tests,
+ AS_HELP_STRING([--enable-installed-tests],
+ [Enable installation of some test cases]),
+ [case ${enableval} in
+ yes) ENABLE_INSTALLED_TESTS="1" ;;
+ no) ENABLE_INSTALLED_TESTS="" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
+ esac])
+ AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
+ AC_ARG_ENABLE(always-build-tests,
+ AS_HELP_STRING([--enable-always-build-tests],
+ [Enable always building tests during 'make all']),
+ [case ${enableval} in
+ yes) ENABLE_ALWAYS_BUILD_TESTS="1" ;;
+ no) ENABLE_ALWAYS_BUILD_TESTS="" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
+ esac])
+ AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
+ if test "$ENABLE_INSTALLED_TESTS" == "1"; then
+ AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
+ AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
+ fi
+])