Skip to contentSkip to conversation

allow tests programs to be installed

PATCH New [email protected] 1 participant 1 message Feb 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 allow tests programs to be installed

From: Benjamin Gaignard <[email protected]>

Install test programs is useful in cross compilation case.
By default the behavior is the same and test programs aren't installed in $bindir. If --enable-install-test-programs is set then test programs are installed in $bindir

---
 configure.ac                |   10 ++++++++++
 tests/kmstest/Makefile.am   |    5 +++++
 tests/modeprint/Makefile.am |    5 +++++
 tests/modetest/Makefile.am  |    5 +++++
 tests/vbltest/Makefile.am   |    6 +++++-
 5 files changed, 30 insertions(+), 1 deletion(-)
configure.ac +10 -0
index 9ee7940..f65c85c 100644
@@ -93,6 +93,11 @@ AC_ARG_ENABLE(exynos-experimental-api,
 	      [Enable support for EXYNOS's experimental API (default: disabled)]),
 	      [EXYNOS=$enableval], [EXYNOS=no])
 
+AC_ARG_ENABLE(install-test-programs,
+		  AS_HELP_STRING([--enable-install-test-programs],
+		  [Install test programs (default: no)]),
+		  [INSTALL_TESTS=$enableval], [INSTALL_TESTS=no])
+
 dnl ===========================================================================
 dnl check compiler flags
 AC_DEFUN([LIBDRM_CC_TRY_FLAG], [
@@ -201,6 +206,11 @@ if test "x$EXYNOS" = xyes; then
 	AC_DEFINE(HAVE_EXYNOS, 1, [Have EXYNOS support])
 fi
 
+AM_CONDITIONAL(HAVE_INSTALL_TESTS, [test "x$INSTALL_TESTS" = xyes])
+if test "x$INSTALL_TESTS" = xyes; then
+	AC_DEFINE(HAVE_INSTALL_TESTS, 1, [Install test programs])
+fi
+
 AC_ARG_ENABLE([cairo-tests],
               [AS_HELP_STRING([--enable-cairo-tests],
                               [Enable support for Cairo rendering in tests (default: auto)])],
tests/kmstest/Makefile.am +5 -0
index ae562a1..7903a26 100644
@@ -3,8 +3,13 @@ AM_CFLAGS = \
 	-I$(top_srcdir)/libkms/ \
 	-I$(top_srcdir)
 
+if HAVE_INSTALL_TESTS
+bin_PROGRAMS = \
+	kmstest
+else
 noinst_PROGRAMS = \
 	kmstest
+endif
 
 kmstest_SOURCES = \
 	main.c
tests/modeprint/Makefile.am +5 -0
index c4862ac..6420ef3 100644
@@ -2,8 +2,13 @@ AM_CFLAGS = \
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)
 
+if HAVE_INSTALL_TESTS
+bin_PROGRAMS = \
+	modeprint
+else
 noinst_PROGRAMS = \
 	modeprint
+endif
 
 modeprint_SOURCES = \
 	modeprint.c
tests/modetest/Makefile.am +5 -0
index 065ae13..410c632 100644
@@ -3,8 +3,13 @@ AM_CFLAGS = \
 	-I$(top_srcdir)/libkms/ \
 	-I$(top_srcdir)
 
+if HAVE_INSTALL_TESTS
+bin_PROGRAMS = \
+	modetest
+else
 noinst_PROGRAMS = \
 	modetest
+endif
 
 modetest_SOURCES = \
 	buffers.c modetest.c buffers.h
tests/vbltest/Makefile.am +5 -1
index 77f9037..f99b6a2 100644
@@ -1,9 +1,13 @@
 AM_CFLAGS = \
 	-I$(top_srcdir)/include/drm \
 	-I$(top_srcdir)
-
+if HAVE_INSTALL_TESTS
+noinst_PROGRAMS = \
+	vbltest
+else
 noinst_PROGRAMS = \
 	vbltest
+endif
 
 vbltest_SOURCES = \
 	vbltest.c
Signature · 1 line
1.7.10