From patchwork Wed Jan 30 13:48:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 14365 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 2A60423E57 for ; Wed, 30 Jan 2013 13:49:08 +0000 (UTC) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by fiordland.canonical.com (Postfix) with ESMTP id B6907A18A3C for ; Wed, 30 Jan 2013 13:49:07 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id cy12so1067743veb.14 for ; Wed, 30 Jan 2013 05:49:07 -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=QGZmeWYm95aryL/PR7tdtSD2KOsuRUofqEMxVS334g8=; b=deDop48qeQq0W1zV2RQMITl9ESd6swEqZwDicSOmZogp+pKidr9LB7hF/3Xh2Zuz7D NMFuP6blYkuPvvB0p8mEnYpUELBlxU4ydSi98XdYL2abEcza1Trt8PgHmdKfbKd1yd5T LIuRLOfUrkmEAwf/ZgDxxaGzBOZ7mBSyZOlcbA/uCoSOq+KaI+Qtm9UDkNtaS1WjL+s2 Z5eFnmGADqcK/bd5n9WtnEXT56eb36Pw8jW7wXugTI7AWN1g19MRU75bufbcHNWQBT+N 76fGmj8s2eAQQHrSeW9KhVuiXKsysMLG29qvDSTvmfkiKYKPNMN/NTN9z3O4yjZjODBj /XTw== X-Received: by 10.58.239.38 with SMTP id vp6mr548682vec.13.1359553747107; Wed, 30 Jan 2013 05:49:07 -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.133.116 with SMTP id pb20csp9503veb; Wed, 30 Jan 2013 05:49:06 -0800 (PST) X-Received: by 10.194.77.13 with SMTP id o13mr9023014wjw.58.1359553745708; Wed, 30 Jan 2013 05:49:05 -0800 (PST) Received: from mail-wi0-x22a.google.com ([2a00:1450:400c:c05::22a]) by mx.google.com with ESMTPS id cg9si483173wjc.76.2013.01.30.05.49.04 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 30 Jan 2013 05:49:05 -0800 (PST) Received-SPF: neutral (google.com: 2a00:1450:400c:c05::22a is neither permitted nor denied by best guess record for domain of benjamin.gaignard@linaro.org) client-ip=2a00:1450:400c:c05::22a; Authentication-Results: mx.google.com; spf=neutral (google.com: 2a00:1450:400c:c05::22a 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-f170.google.com with SMTP id hm11so119370wib.1 for ; Wed, 30 Jan 2013 05:49:04 -0800 (PST) X-Received: by 10.194.172.228 with SMTP id bf4mr9121596wjc.38.1359553744725; Wed, 30 Jan 2013 05:49:04 -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 ex6sm3031287wid.3.2013.01.30.05.49.03 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 30 Jan 2013 05:49:04 -0800 (PST) From: benjamin.gaignard@linaro.org To: patches@linaro.org Cc: Benjamin Gaignard Subject: [PATCH] autogen.sh: allow calling from out-of-tree Date: Wed, 30 Jan 2013 14:48:30 +0100 Message-Id: <1359553710-5436-1-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 1.7.10 X-Gm-Message-State: ALoCoQnV/ICpu9KXNkCwDZ1UcibZS9eQmacwWPB05Bp63WbUxMJIJRptsCN4fRVJ/07lOnPpwFoO From: Benjamin Gaignard Signed-off-by: Benjamin Gaignard --- autogen.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 768d123..7a8f1df 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,10 +1,17 @@ #!/bin/sh # Run this to generate all the initial makefiles, etc. +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd "$srcdir" + DIE=0 package=gst-plugins-good srcfile=gst/law/alaw.c +echo "$(pwd)" # Make sure we have common if test ! -f common/gst-autogen.sh; then @@ -109,13 +116,15 @@ test -n "$NOCONFIGURE" && { exit 0 } +cd "$olddir" + echo "+ running configure ... " -test ! -z "$CONFIGURE_DEF_OPT" && echo " ./configure default flags: $CONFIGURE_DEF_OPT" -test ! -z "$CONFIGURE_EXT_OPT" && echo " ./configure external flags: $CONFIGURE_EXT_OPT" -test ! -z "$CONFIGURE_FILE_OPT" && echo " ./configure enable/disable flags: $CONFIGURE_FILE_OPT" +test ! -z "$CONFIGURE_DEF_OPT" && echo " $srcdir/configure default flags: $CONFIGURE_DEF_OPT" +test ! -z "$CONFIGURE_EXT_OPT" && echo " $srcdir/configure external flags: $CONFIGURE_EXT_OPT" +test ! -z "$CONFIGURE_FILE_OPT" && echo " $srcdir/configure enable/disable flags: $CONFIGURE_FILE_OPT" echo -./configure $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || { +"$srcdir/configure" $CONFIGURE_DEF_OPT $CONFIGURE_EXT_OPT $CONFIGURE_FILE_OPT || { echo " configure failed" exit 1 }