From patchwork Wed Feb 6 13:08:53 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 2104181 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork1.kernel.org (Postfix) with ESMTP id 291763FDF1 for ; Wed, 6 Feb 2013 13:11:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 34BCAE67B9 for ; Wed, 6 Feb 2013 05:11:42 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wg0-f54.google.com (mail-wg0-f54.google.com [74.125.82.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 9AB83E67B2 for ; Wed, 6 Feb 2013 05:09:24 -0800 (PST) Received: by mail-wg0-f54.google.com with SMTP id fm10so1054134wgb.21 for ; Wed, 06 Feb 2013 05:09:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=z/aY5CEDSfbLkI/KllctYa++sthlhNhmaIesI13gSTA=; b=XCUdYs9Ux1BKkQmeR5fwu+e31X7ky5D0to8HGIfuL7CrVW5lmCyqMsa6E8krfsPdhL QZqXj87zFHYE/ABOvrSKI1xrwoA0UlsiRHQTE3Hr98i18R9iaOl37DLrLrxRdxoNDEio e8Qizyi+b02xcM415LhVKk1ZTPZeSMOyJyg7ZujJb5+D31lkEfX45Xb/aw4TXgpRTVT5 bQDlnAaFWU4MyeZiDNj9D7zKsG3cdIVMLJGEnBMdPQBzzXaTQz304RMmL1OpDxRg8r9l zFpyIbMuP4ZeHrpGAeEO4H0pdX7tvCTUgGd2nw5pjBkLNrYoddu7Jo3CzAjMb+3e1N06 YT8g== X-Received: by 10.194.76.237 with SMTP id n13mr50105481wjw.57.1360156163648; Wed, 06 Feb 2013 05:09:23 -0800 (PST) Received: from localhost.localdomain (LPuteaux-156-14-44-212.w82-127.abo.wanadoo.fr. [82.127.83.212]) by mx.google.com with ESMTPS id n2sm2886037wiy.6.2013.02.06.05.09.22 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Feb 2013 05:09:23 -0800 (PST) From: benjamin.gaignard@linaro.org To: dri-devel@lists.freedesktop.org Subject: [PATCH] [configure.ac] allow tests programs to be installed Date: Wed, 6 Feb 2013 14:08:53 +0100 Message-Id: <1360156133-32095-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.10 X-Gm-Message-State: ALoCoQkVRaMjfdyRz7WqhmUVm01Ix8UTvqvlzbAM96aNZm18rsMTDGz3gM6mdTlH3U6VjEHXjHBP Cc: Benjamin Gaignard X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org From: Benjamin Gaignard 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 Signed-off-by: Benjamin Gaignard --- 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(-) diff --git a/configure.ac b/configure.ac index 9ee7940..f65c85c 100644 --- a/configure.ac +++ b/configure.ac @@ -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)])], diff --git a/tests/kmstest/Makefile.am b/tests/kmstest/Makefile.am index ae562a1..7903a26 100644 --- a/tests/kmstest/Makefile.am +++ b/tests/kmstest/Makefile.am @@ -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 diff --git a/tests/modeprint/Makefile.am b/tests/modeprint/Makefile.am index c4862ac..6420ef3 100644 --- a/tests/modeprint/Makefile.am +++ b/tests/modeprint/Makefile.am @@ -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 diff --git a/tests/modetest/Makefile.am b/tests/modetest/Makefile.am index 065ae13..410c632 100644 --- a/tests/modetest/Makefile.am +++ b/tests/modetest/Makefile.am @@ -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 diff --git a/tests/vbltest/Makefile.am b/tests/vbltest/Makefile.am index 77f9037..f99b6a2 100644 --- a/tests/vbltest/Makefile.am +++ b/tests/vbltest/Makefile.am @@ -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