summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac11
-rw-r--r--examples/Makefile.am2
-rw-r--r--src/Makefile.am2
-rw-r--r--src/environment.cpp6
4 files changed, 12 insertions, 9 deletions
diff --git a/configure.ac b/configure.ac
index 40a0e70..e6f94df 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,16 +18,19 @@ AC_SUBST([LIB_VERSION])
# Initialize libtool
AC_PROG_LIBTOOL
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_INSTALL
+
+AC_LANG([C++])
+
# Require X.Org macros 1.16 or later for XORG_TESTSET_CFLAG
m4_ifndef([XORG_MACROS_VERSION],
[m4_fatal([must install xorg-macros 1.16 or later before running autoconf/autogen])])
XORG_MACROS_VERSION(1.16)
XORG_DEFAULT_OPTIONS
-# Checks for programs.
-AC_PROG_CXX
-AC_PROG_INSTALL
-
PKG_CHECK_MODULES(XSERVER, x11)
# Check for Google Test
diff --git a/examples/Makefile.am b/examples/Makefile.am
index b311687..e8f8713 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -29,7 +29,7 @@ noinst_PROGRAMS = xorg-gtest-example
xorg_gtest_example_SOURCES = xorg-gtest.cpp
AM_CPPFLAGS = -I$(top_srcdir)/include
-AM_CXXFLAGS = $(XSERVER_CFLAGS) $(GTEST_CPPFLAGS)
+AM_CXXFLAGS = $(XSERVER_CFLAGS) $(GTEST_CPPFLAGS) $(BASE_CXXFLAGS)
xorg_gtest_example_LDADD = $(top_builddir)/src/libxorg-gtest.la $(top_builddir)/src/libxorg-gtest_main.la -lgtest -lpthread -lX11
diff --git a/src/Makefile.am b/src/Makefile.am
index 06a5e12..0790745 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -50,6 +50,6 @@ libxorg_gtest_main_la_LDFLAGS = \
$(XSERVER_LIBS) \
-Wl,--version-script=$(top_srcdir)/src/libxorg-gtest_main.ver
-AM_CXXFLAGS = -I$(top_srcdir)/include $(XSERVER_CFLAGS)
+AM_CXXFLAGS = -I$(top_srcdir)/include $(XSERVER_CFLAGS) $(BASE_CXXFLAGS)
EXTRA_DIST = libxorg-gtest.ver libxorg-gtest_main.ver
diff --git a/src/environment.cpp b/src/environment.cpp
index 845c1a6..3da27cb 100644
--- a/src/environment.cpp
+++ b/src/environment.cpp
@@ -113,10 +113,10 @@ void xorg::testing::Environment::SetUp() {
Process::SetEnv("DISPLAY", display_string, true);
for (int i = 0; i < 10; ++i) {
- Display* display = XOpenDisplay(NULL);
+ Display* test_display = XOpenDisplay(NULL);
- if (display) {
- XCloseDisplay(display);
+ if (test_display) {
+ XCloseDisplay(test_display);
return;
}