+## Install config files and back-end programs in our own subdirecctories.
+##
+nmhetcdir = @sysconfdir@/nmh
+nmhlibexecdir = @libexecdir@/nmh
+
+##
+## nmh _does_ have a test suite!
+##
+TESTS_ENVIRONMENT = MH_OBJ_DIR="@abs_builddir@" \
+ MH_VERSION="$(VERSION)" \
+ OAUTH_SUPPORT='@OAUTH_SUPPORT@' \
+ CURL_USER_AGENT='@CURL_USER_AGENT@' \
+ MH_TEST_DIR=`cd "@abs_builddir@" && pwd -P`/test/testdir \
+ nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
+ mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
+ nmhetcdirinst="@nmhetcdirinst@$(nmhetcdir)" \
+ supported_locks="$(supported_locks)" \
+ default_locking="${default_locking}" \
+ MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
+ ICONV_ENABLED=$(ICONV_ENABLED) \
+ $(TESTS_SHELL) ## Keep at end of TESTS_ENVIRONMENT.
+##
+## Important note: the "cleanup" test should always be last
+##
+TESTS = test/ali/test-ali test/anno/test-anno \
+ test/bad-input/test-header \
+ test/burst/test-burst test/burst/test-burst-mime \
+ test/comp/test-comp-format test/dist/test-dist \
+ test/folder/test-create test/folder/test-nocreate \
+ test/folder/test-packf test/folder/test-recurse \
+ test/folder/test-sortm test/folder/test-total \
+ test/format/test-curses test/format/test-dp \
+ test/format/test-fmtdump test/format/test-functions \
+ test/format/test-localmbox test/format/test-myname \
+ test/format/test-myhost test/format/test-mymbox \
+ test/format/test-nullstr \
+ test/format/test-rightjustify \
+ test/format/test-unquote \
+ test/forw/test-forw-digest test/forw/test-forw-format \
+ test/inc/test-deb359167 test/inc/test-eom-align \
+ test/inc/test-inc-scanout test/inc/test-msgchk \
+ test/inc/test-pop \
+ test/install-mh/test-install-mh test/install-mh/test-version-check \
+ test/locking/test-datalocking test/locking/test-spoollocking \
+ test/manpages/test-manpages \
+ test/mhbuild/test-attach \
+ test/mhbuild/test-cte \
+ test/mhbuild/test-ext-params \
+ test/mhbuild/test-forw test/mhbuild/test-header-encode \
+ test/mhbuild/test-utf8-body \
+ test/mhfixmsg/test-mhfixmsg test/mhical/test-mhical \
+ test/mhl/test-mhl-flags test/mhl/test-rfc6532 \
+ test/mhlist/test-mhlist test/mhlist/test-ext-params \
+ test/mhmail/test-mhmail \
+ test/mhparam/test-mhparam test/mhpath/test-mhpath \
+ test/mhshow/test-binary \
+ test/mhshow/test-charset test/mhshow/test-textcharset \
+ test/mhshow/test-cte-binary test/mhshow/test-qp \
+ test/mhshow/test-subpart test/mhshow/test-msg-buffer-boundaries \
+ test/mhstore/test-mhstore test/mkstemp/test-mkstemp \
+ test/new/test-basic test/pick/test-pick test/pick/test-stderr \
+ test/oauth/test-mhlogin test/oauth/test-mhparam test/oauth/test-send \
+ test/oauth/test-sendfrom test/oauth/test-inc test/oauth/test-share \
+ test/post/test-post-aliases test/post/test-post-basic \
+ test/post/test-post-multiple test/post/test-post-bcc \
+ test/post/test-post-dcc test/post/test-post-fcc \
+ test/post/test-post-multifrom test/post/test-post-envelope \
+ test/post/test-post-group test/post/test-mts test/post/test-messageid \
+ test/post/test-rfc6531 test/post/test-sendfiles \
+ test/prompter/test-prompter \
+ test/rcv/test-rcvdist test/rcv/test-rcvpack test/rcv/test-rcvstore \
+ test/rcv/test-rcvtty test/refile/test-refile test/repl/test-convert \
+ test/repl/test-if-str test/repl/test-trailing-newline \
+ test/repl/test-multicomp test/repl/test-repl \
+ test/scan/test-header-parsing \
+ test/scan/test-scan test/scan/test-scan-multibyte \
+ test/sequences/test-flist test/sequences/test-mark \
+ test/sequences/test-out-of-range \
+ test/send/test-sendfrom \
+ test/show/test-show \
+ test/slocal/test-slocal \
+ test/whatnow/test-attach-detach test/whatnow/test-cd \
+ test/whatnow/test-ls test/whom/test-whom \
+ test/cleanup ## The "cleanup" test should always be last.
+
+XFAIL_TESTS = \
+ test/scan/test-header-parsing \
+ #
+
+check_SCRIPTS = test/common.sh
+check_PROGRAMS = test/getfullname test/getcanon test/fakepop test/fakesmtp \
+ test/getcwidth test/fakehttp
+
+## So they can be built without builing the `check' target.
+check-programs: $(check_PROGRAMS)
+
+## The location of installed nmhetcdir is, for all purposes except
+## distcheck, $nmhetcdir. For distcheck, prepend $MH_INST_DIR (from
+## test/common.sh.in), which is based on $MH_TEST_DIR (from
+## $TESTS_ENVIRONMENT).
+AM_DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1 \
+ NMHETCDIRINST='$${abs_builddir}/test/testdir/inst'