diff options
author | Keith Packard <keithp@keithp.com> | 2012-12-04 20:32:56 -0800 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2012-12-05 17:17:55 +1000 |
commit | 60f2cfd3b4aa3bea60a26cdc4cc6a169d8669999 (patch) | |
tree | 765b600f301f740175b8e82c6f04f5c3010d6b04 | |
parent | 0197de16f185416d353e71c4b4fc2a70a964f9f8 (diff) |
Fix CFLAGS to find correct header files
Need to actually use X11_CFLAGS and EVEMU_CFLAGS in CPPFLAGS, CXXFLAGS
(and presumably CFLAGS if that were relevant).
Also must search local directories before system directories for our
header files, otherwise installed versions will override local
versions which would be bad.
Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | examples/Makefile.am | 10 | ||||
-rw-r--r-- | test/Makefile.am | 8 |
3 files changed, 11 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac index 8d52928..efd96f5 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,8 @@ AS_IF([test "x$have_evemu" = xyes], [AC_DEFINE([HAVE_EVEMU])]) AC_SUBST(SOURCEDIR, ['${prefix}/src/xorg-gtest']) AC_SUBST(DUMMY_CONF_PATH, ['${datarootdir}/xorg/gtest/dummy.conf']) +AC_SUBST(BASE_CPPFLAGS, ['$(X11_CFLAGS) $(EVEMU_CFLAGS)']) + # Check if we can build integration tests AS_IF([test "x$enable_integration_tests" != xno], [AC_MSG_CHECKING([for X.org server])] diff --git a/examples/Makefile.am b/examples/Makefile.am index 84b4dbb..b3ab863 100644 --- a/examples/Makefile.am +++ b/examples/Makefile.am @@ -39,18 +39,18 @@ libgtest_a_CXXFLAGS = $(GTEST_CXXFLAGS) $(AM_CXXFLAGS) # build xorg-gtest as static lib libxorg_gtest_a_SOURCES = $(top_srcdir)/src/xorg-gtest-all.cpp libxorg_gtest_a_CPPFLAGS = \ - $(AM_CPPFLAGS) \ -I$(top_srcdir)/include \ -I$(top_srcdir) \ + $(AM_CPPFLAGS) \ -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" libxorg_gtest_a_CXXFLAGS = $(GTEST_CXXFLAGS) $(AM_CXXFLAGS) # build xorg-gtest's main as separate lib for those that need it libxorg_gtest_main_a_SOURCES = $(top_srcdir)/src/xorg-gtest_main.cpp libxorg_gtest_main_a_CPPFLAGS = \ - $(AM_CPPFLAGS) \ -I$(top_srcdir)/include \ - -I$(top_srcdir) + -I$(top_srcdir) \ + $(AM_CPPFLAGS) libxorg_gtest_main_a_CXXFLAGS = $(GTEST_CXXFLAGS) $(AM_CXXFLAGS) noinst_PROGRAMS = xorg-gtest-environment-example xorg-gtest-example @@ -59,7 +59,7 @@ if ENABLE_XORG_GTEST_TESTS TESTS = $(noinst_PROGRAMS) endif xorg_gtest_example_SOURCES = xorg-gtest-example.cpp -xorg_gtest_example_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include +xorg_gtest_example_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) xorg_gtest_example_LDADD = \ libgtest.a \ libxorg-gtest.a \ @@ -69,7 +69,7 @@ xorg_gtest_example_LDADD = \ xorg_gtest_environment_example_SOURCES = xorg-gtest-environment-example.cpp -xorg_gtest_environment_example_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include +xorg_gtest_environment_example_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) xorg_gtest_environment_example_LDADD = \ libgtest.a \ diff --git a/test/Makefile.am b/test/Makefile.am index be0fc31..a8ec35a 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -36,8 +36,8 @@ dist_noinst_DATA = PIXART-USB-OPTICAL-MOUSE.desc GTEST_CPPFLAGS=-I$(top_srcdir)/gtest/include -I$(top_srcdir)/gtest -AM_CPPFLAGS = $(GTEST_CPPFLAGS) -AM_CXXFLAGS = $(BASE_CXXFLAGS) \ +AM_CPPFLAGS = $(GTEST_CPPFLAGS) $(BASE_CPPFLAGS) +AM_CXXFLAGS = $(BASE_CXXFLAGS) $(BASE_CPPFLAGS) \ -DTEST_ROOT_DIR=\"$(abs_top_srcdir)/test/\" tests_libraries = \ @@ -48,14 +48,14 @@ tests_libraries = \ $(EVEMU_LIBS) process_test_SOURCES = process-test.cpp -process_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include +process_test_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) process_test_LDADD = $(tests_libraries) process_test_helper_SOURCES = process-test-helper.cpp process_test_helper_CPPFLAGS = $(AM_CPPFLAGS) xserver_test_SOURCES = xserver-test.cpp -xserver_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_srcdir)/include \ +xserver_test_CPPFLAGS = -I$(top_srcdir)/include $(AM_CPPFLAGS) \ -DDUMMY_CONF_PATH="\"$(abs_top_srcdir)/data/xorg/gtest/dummy.conf\"" xserver_test_LDADD = $(tests_libraries) |