diff --git a/libavdevice/Makefile b/libavdevice/Makefile
index e93d1ec9773c4485b59debbfac68dc620f73b468..26cae5bbfa0329d71b457f858463e7188b9838ab 100644
--- a/libavdevice/Makefile
+++ b/libavdevice/Makefile
@@ -33,4 +33,4 @@ OBJS-$(HAVE_LIBC_MSVCRT)                 += file_open.o
 SKIPHEADERS-$(HAVE_ALSA_ASOUNDLIB_H)     += alsa.h
 SKIPHEADERS-$(HAVE_SNDIO_H)              += sndio.h
 
-TESTPROGS = timefilter
+TESTPROGS-$(CONFIG_JACK_INDEV)           += timefilter
diff --git a/tests/fate/libavdevice.mak b/tests/fate/libavdevice.mak
index cb6af5162f060eda465a737c0035c6f6b3b31725..b30ae99779cf2322f9be33d9e48a1cdf111a0cf0 100644
--- a/tests/fate/libavdevice.mak
+++ b/tests/fate/libavdevice.mak
@@ -1,4 +1,4 @@
-FATE_LIBAVDEVICE-yes += fate-timefilter
+FATE_LIBAVDEVICE-$(CONFIG_JACK_INDEV) += fate-timefilter
 fate-timefilter: libavdevice/timefilter-test$(EXESUF)
 fate-timefilter: CMD = run libavdevice/timefilter-test