build: Add a test suite infrastructure
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/Makefile.am b/Makefile.am
index 4a6a326..ae7cd20 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in
-SUBDIRS = include man src
+SUBDIRS = include man src test
ACLOCAL_AMFLAGS = -I m4
diff --git a/configure.ac b/configure.ac
index b34b416..06a02b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,6 +45,7 @@ AC_CONFIG_FILES([
src/Makefile
src/libbsd.pc
src/libbsd-overlay.pc
+ test/Makefile
])
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
diff --git a/test/Makefile.am b/test/Makefile.am
new file mode 100644
index 0000000..6977948
--- /dev/null
+++ b/test/Makefile.am
@@ -0,0 +1,16 @@
+## Process this file with automake to produce Makefile.in
+
+# Set default values for user variables
+CFLAGS = -Wall -Wextra -Wno-unused-variable -Wno-unused-parameter
+
+AM_CPPFLAGS = \
+ -I$(top_builddir) \
+ -isystem $(top_srcdir)/include/bsd/ \
+ -include $(top_builddir)/config.h \
+ -DLIBBSD_OVERLAY -DLIBBSD_DISABLE_DEPRECATED \
+ -D__REENTRANT
+
+check_PROGRAMS = \
+ $(nil)
+
+TESTS = $(check_PROGRAMS)