From patchwork Wed Feb 6 15:20:07 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 14642 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DAAFE23EAD for ; Wed, 6 Feb 2013 15:20:42 +0000 (UTC) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by fiordland.canonical.com (Postfix) with ESMTP id 111F0A1979F for ; Wed, 6 Feb 2013 15:20:41 +0000 (UTC) Received: by mail-ve0-f177.google.com with SMTP id m1so1284382ves.8 for ; Wed, 06 Feb 2013 07:20:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=z/aY5CEDSfbLkI/KllctYa++sthlhNhmaIesI13gSTA=; b=bWZ9pipEE1ibGoW8maxgcxOk442QGLJJhCCk2a1oo8m8P3J8hDaZ51dQ62bycdKr+h MpSNVTVWYL3dgGGV/6UZXKEP4qJgMKIkDJ74Z48+esqS1PEF81TRkqXw3Tvflz5Ai2nv f/PL0wQQKt1BmJj8hGrfKO0VzMbj7p6AQ0ycm68oY4/2SyR4QVcnWhEo20SaVW61nDHx uI4zEzZrGn6MAyOt/WO9OgdgDUAx0kX9/5S0wi7ZDQztqqAeUcyDoNVCII93Sdn8APYf M8YneAfKAvY53RNj94RJWtvBS6y1qk3nQvhHwo1jR+r3uBslxm8oL7xCpRSIPTlL9Gyf 60zQ== X-Received: by 10.52.27.50 with SMTP id q18mr29524044vdg.20.1360164041517; Wed, 06 Feb 2013 07:20:41 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.252.8 with SMTP id zo8csp35866vec; Wed, 6 Feb 2013 07:20:39 -0800 (PST) X-Received: by 10.194.5.74 with SMTP id q10mr50798985wjq.13.1360164038610; Wed, 06 Feb 2013 07:20:38 -0800 (PST) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by mx.google.com with ESMTPS id hn8si761379wib.117.2013.02.06.07.20.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 06 Feb 2013 07:20:38 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.175 is neither permitted nor denied by best guess record for domain of benjamin.gaignard@linaro.org) client-ip=209.85.212.175; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.175 is neither permitted nor denied by best guess record for domain of benjamin.gaignard@linaro.org) smtp.mail=benjamin.gaignard@linaro.org Received: by mail-wi0-f175.google.com with SMTP id l13so5159498wie.14 for ; Wed, 06 Feb 2013 07:20:38 -0800 (PST) X-Received: by 10.194.156.170 with SMTP id wf10mr32456926wjb.25.1360164038094; Wed, 06 Feb 2013 07:20:38 -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 e12sm3879731wiw.5.2013.02.06.07.20.37 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 06 Feb 2013 07:20:37 -0800 (PST) From: benjamin.gaignard@linaro.org To: patches@linaro.org Cc: Benjamin Gaignard , Benjamin Gaignard Subject: [PATCH] [configure.ac] allow tests programs to be installed Date: Wed, 6 Feb 2013 16:20:07 +0100 Message-Id: <1360164007-2432-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.10 X-Gm-Message-State: ALoCoQkpbYjmgA0Yfscx050oKZIS5xyO5DwRlh9I15/YKkkF51zvE24n8ONA4LjiqpIRb+aPbUPM 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