Merge branch 'G_SOURCE_FUNC-macro' into 'master'
[glib.git] / m4macros / glibtests.m4
blob581726a5175d568407a093dcd8a103bfc19787ae
1 # Increment this whenever this file is changed.
2 #serial 1
4 dnl GLIB_TESTS
5 dnl
7 AC_DEFUN([GLIB_TESTS],
9   AC_ARG_ENABLE(installed-tests,
10                 AS_HELP_STRING([--enable-installed-tests],
11                                [Enable installation of some test cases]),
12                 [case ${enableval} in
13                   yes) ENABLE_INSTALLED_TESTS="1"  ;;
14                   no)  ENABLE_INSTALLED_TESTS="" ;;
15                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-installed-tests]) ;;
16                  esac])
17   AM_CONDITIONAL([ENABLE_INSTALLED_TESTS], test "$ENABLE_INSTALLED_TESTS" = "1")
18   AC_ARG_ENABLE(always-build-tests,
19                 AS_HELP_STRING([--enable-always-build-tests],
20                                [Enable always building tests during 'make all']),
21                 [case ${enableval} in
22                   yes) ENABLE_ALWAYS_BUILD_TESTS="1"  ;;
23                   no)  ENABLE_ALWAYS_BUILD_TESTS="" ;;
24                   *) AC_MSG_ERROR([bad value ${enableval} for --enable-always-build-tests]) ;;
25                  esac])
26   AM_CONDITIONAL([ENABLE_ALWAYS_BUILD_TESTS], test "$ENABLE_ALWAYS_BUILD_TESTS" = "1")
27   if test "$ENABLE_INSTALLED_TESTS" = "1"; then
28     AC_SUBST(installed_test_metadir, [${datadir}/installed-tests/]AC_PACKAGE_NAME)
29     AC_SUBST(installed_testdir, [${libexecdir}/installed-tests/]AC_PACKAGE_NAME)
30   fi