cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for
C/ObjC but not for C++ [enabled by default]
Since gcc also complains about adding -Wno-strict-prototypes we have to handle
the two separately. A side-effect here: now that we promote the GCC_CFLAGS to
AM_CFLAGS, litest.la is built with the correct CFLAGS too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
PKG_CHECK_MODULES(LIBEVDEV, [libevdev >= 0.4])
if test "x$GCC" = "xyes"; then
- GCC_CFLAGS="-Wall -Wextra -Wno-unused-parameter -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
+ GCC_CXXFLAGS="-Wall -Wextra -Wno-unused-parameter -g -fvisibility=hidden"
+ GCC_CFLAGS="$GCC_CXXFLAGS -Wmissing-prototypes -Wstrict-prototypes"
fi
AC_SUBST(GCC_CFLAGS)
+AC_SUBST(GCC_CXXFLAGS)
AC_PATH_PROG(DOXYGEN, [doxygen])
if test "x$DOXYGEN" = "x"; then
$(CHECK_CFLAGS) \
$(LIBEVDEV_CFLAGS)
+AM_CFLAGS = $(GCC_CFLAGS)
+AM_CXXFLAGS = $(GCC_CXXFLAGS)
+
TEST_LIBS = liblitest.la $(CHECK_LIBS) $(LIBUDEV_LIBS) $(LIBEVDEV_LIBS) $(top_builddir)/src/libinput.la -lm
-TEST_CFLAGS = $(GCC_CFLAGS) $(AM_CFLAGS)
+TEST_CFLAGS = $(AM_CFLAGS)
noinst_LTLIBRARIES = liblitest.la
liblitest_la_SOURCES = \
$(top_srcdir)/src/libinput-util.h \