diff options
author | Ian Romanick <[email protected]> | 2011-12-15 18:45:27 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2012-01-02 12:41:45 -0800 |
commit | 3ef3ba4d2eee36f64062a21ce030c3f4d8c4cac4 (patch) | |
tree | cb7b3bc1f1946f49cf597abd5fae30035223e308 /configure.ac | |
parent | 8a4b36de05a133c1c9527836ca58bf8ebdf229bd (diff) |
tests/glx: Add unit tests for GLX_ARB_create_context GLX protocol
This adds a new tests directory at the top-level and some extra build
infrastructure. The tests use the Google C++ Testing Framework, and
they will only be built if configure can detect its availability. The
tests are automatically wired-in to run with 'make check'.
Signed-off-by: Ian Romanick <[email protected]>
Acked-by: Chad Versace <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 8e809b938c6..c29b0bb4a5d 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -dnl Process this file with autoconf to create configure. +nl Process this file with autoconf to create configure. AC_PREREQ([2.59]) @@ -16,6 +16,7 @@ AC_INIT([Mesa],[mesa_version], [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) AC_CONFIG_AUX_DIR([bin]) AC_CANONICAL_HOST +AM_INIT_AUTOMAKE([foreign]) dnl Save user CFLAGS and CXXFLAGS so one can override the default ones USER_CFLAGS="$CFLAGS" @@ -65,6 +66,19 @@ solaris*) ;; esac +AC_PATH_PROG([GTESTCONFIG], [gtest-config]) +if test "x$GTESTCONFIG" != "x"; then + GTEST_CFLAGS=`gtest-config --cppflags --cxxflags` + GTEST_LIBS=`gtest-config --ldflags --libs` + HAVE_GTEST=1 + AC_SUBST([GTEST_CFLAGS]) + AC_SUBST([GTEST_LIBS]) + HAVE_GTEST=yes +else + HAVE_GTEST=no +fi +AM_CONDITIONAL(HAVE_GTEST, test x$HAVE_GTEST = xyes) + dnl clang is mostly GCC-compatible, but its version is much lower, dnl so we have to check for it. AC_MSG_CHECKING([if compiling with clang]) @@ -1907,7 +1921,9 @@ CFLAGS="$CFLAGS $USER_CFLAGS" CXXFLAGS="$CXXFLAGS $USER_CXXFLAGS" dnl Substitute the config -AC_CONFIG_FILES([configs/autoconf]) +AC_CONFIG_FILES([configs/autoconf + tests/Makefile + tests/glx/Makefile]) dnl Replace the configs/current symlink AC_CONFIG_COMMANDS([configs],[ |