--- a/configure.ac
+++ b/configure.ac
@@ -19,6 +19,7 @@
 AC_SUBST(LT_CURRENT)
 AC_SUBST(LT_REVISION)
 LT_AGE=0
+AC_SUBST(LT_AGE)
 
 LT_VERSION_INFO="$LT_CURRENT:$LT_REVISION:$LT_AGE"
 AC_SUBST(LT_VERSION_INFO)
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,4 +2,4 @@
 
 noinst_PROGRAMS=fakekey-test
 
-fakekey_test_LDADD=../src/libfakekey.la
\ No newline at end of file
+fakekey_test_LDADD=../src/libfakekey.la -lX11
