configure: slightly more standard --disable-tests
authorBen Widawsky <ben@bwidawsk.net>
Thu, 7 Feb 2013 18:30:03 +0000 (10:30 -0800)
committerBen Widawsky <ben@bwidawsk.net>
Thu, 7 Feb 2013 18:30:03 +0000 (10:30 -0800)
Cc: Julien Cristau <jcristau@debian.org>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
configure.ac
tests/Makefile.am

index e66876c..d66c9f9 100644 (file)
@@ -128,7 +128,6 @@ AC_ARG_ENABLE(tests,
              [BUILD_TESTS=$enableval], [BUILD_TESTS="yes"])
 if test "x$BUILD_TESTS" = xyes; then
        AC_DEFINE(BUILD_TESTS, 1, [Build tests])
-       AC_CONFIG_FILES([tests/Makefile])
 fi
 AM_CONDITIONAL(BUILD_TESTS, [test "x$BUILD_TESTS" = xyes])
 
@@ -139,6 +138,7 @@ AC_CONFIG_FILES([
                 lib/Makefile
                 man/Makefile
                 scripts/Makefile
+                tests/Makefile
                 tools/Makefile
                 debugger/Makefile
                 debugger/system_routine/Makefile
index 20b7324..ef68a02 100644 (file)
@@ -1,3 +1,4 @@
+if BUILD_TESTS
 noinst_PROGRAMS = \
        gem_stress \
        $(TESTS_progs) \
@@ -195,3 +196,4 @@ prime_nv_api_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
 prime_nv_api_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
 prime_nv_pcopy_CFLAGS = $(AM_CFLAGS) $(DRM_NOUVEAU_CFLAGS)
 prime_nv_pcopy_LDADD = $(LDADD) $(DRM_NOUVEAU_LIBS)
+endif