diff options
author | Benjamin Gaignard <benjamin.gaignard@st.com> | 2013-01-30 09:15:18 +0100 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.net> | 2013-01-30 10:32:00 +0000 |
commit | 7ffb57d8a1a2c662de85b7d127638a9827f147ed (patch) | |
tree | fda7314a7ca8fcea435dc74f9e2317015d2171e2 /autogen.sh | |
parent | 8d8afe7e85c82229eae3b510a9c5aab7a1530158 (diff) |
autogen.sh: allow calling from out-of-tree
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
https://bugzilla.gnome.org/show_bug.cgi?id=692857
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -1,10 +1,16 @@ #!/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-ugly srcfile=ext/mad/gstmad.c +echo "$(pwd)" # Make sure we have common if test ! -f common/gst-autogen.sh; then @@ -109,13 +115,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 } |