From: Damien Lespiau Subject: [PATCH i-g-t] build: Don't fail if SWIG isn't found Date: Wed, 28 May 2014 14:18:34 +0100 Message-ID: <1401283114-31845-1-git-send-email-damien.lespiau@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 4E5E76E867 for ; Wed, 28 May 2014 06:19:29 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org People from distros have reported that packaging the newer versions is more difficult because we now depend on SWIG. We don't have to, it's needed for the python dumper and is an optional build dependency. Signed-off-by: Damien Lespiau --- configure.ac | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b71b100..6226829 100644 --- a/configure.ac +++ b/configure.ac @@ -132,7 +132,13 @@ AM_CONDITIONAL(HAVE_NOUVEAU, [test "x$NOUVEAU" = xyes]) AC_ARG_ENABLE(dumper, AS_HELP_STRING([--disable-dumper], [Disable the python based register dumper (default: enabled)]), - [DUMPER=$enableval], [DUMPER=yes]) + [DUMPER=$enableval], [DUMPER=auto]) +if test "x$DUMPER" = xauto; then + # AX_PYTHON_DEVEL/AX_SWIG_PYTHON are not super friendly and don't + # easily allow us to introspect the result of their checks. So if we + # find SWING on the system, that's enough to try compiling the dumper. + AX_PKG_SWIG(2.0.0, [DUMPER=yes], [DUMPER=no]) +fi if test "x$DUMPER" == xyes; then AC_DEFINE(HAVE_DUMPER, 1, [Have dumper support]) # SWIG configuration -- 1.8.4.2