We don't build with -pedantic, but a caller may try to actually stick to the
c99 standard, so let's make sure our public header doesn't cause any
issues there.
Likewise, make sure that our header compiles with GNU C90.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
AM_CPPFLAGS = -I$(top_srcdir)/src
run_tests =
-build_tests =
+build_tests = test-build-pedantic-c99 test-build-std-gnuc90
noinst_PROGRAMS = $(build_tests) $(run_tests)
TESTS = $(run_tests)
+# build-test only
+test_build_pedantic_c99_SOURCES = build-pedantic.c
+test_build_pedantic_c99_CFLAGS = $(AM_CPPFLAGS) -std=c99 -pedantic -Werror
+
+test_build_std_gnuc90_SOURCES = build-pedantic.c
+test_build_std_gnuc90_CFLAGS = $(AM_CPPFLAGS) -std=gnu90 -Werror
+
endif
--- /dev/null
+#include <libinput.h>
+
+/* This is a build-test only */
+
+int
+main(int argc, char **argv) {
+ return 0;
+}