# have all needed files, that a GNU package needs
AUTOMAKE_OPTIONS = foreign 1.4
-SUBDIRS = src
+SUBDIRS = src doc test examples codegen examples-codegen
+
+# Install the pkg-config file:
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = libt2n.pc
+
+if AUTOCHECK
+all: config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+ $(MAKE) $(AM_MAKEFLAGS) check
+endif
+
+m4datadir = $(datadir)/aclocal
+m4data_DATA = libt2n.m4
+
+EXTRA_DIST = COPYING COPYING.LIB $(m4data_DATA) test-build-install-use