There should have been a good reason to put `TESTS` outside the
conditional but I don't remember it. It works by putting `TESTS`
inside the conditional and avoid an odd error message when trying to
execute tests without check installed.
AM_CFLAGS = -I $(top_srcdir)/include
-TESTS = check_marshal check_lldp check_cdp check_sonmp check_edp check_fixedpoint
if HAVE_CHECK
+TESTS = check_marshal check_lldp check_cdp check_sonmp check_edp check_fixedpoint
AM_CFLAGS += @CHECK_CFLAGS@
LDADD = $(top_builddir)/src/daemon/liblldpd.la @CHECK_LIBS@ @LIBEVENT_LDFLAGS@