diff options
author | Javier Jardón <jjardon@gnome.org> | 2012-06-28 01:08:03 +0900 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2012-08-27 10:25:18 +0200 |
commit | a8636b4310c9ea8c72b7a5efbc04c43df606b937 (patch) | |
tree | 5af1549c4a663443f2770cfcffecc3531be3ace7 /autogen.sh | |
parent | 749fab61b91a2a90ec2369684b2976eea3d44fdf (diff) |
autogen: fix configure script generation when srcdir != builddir.
This patch allows for regenerating the configure script from a build
directory that is not the actual source directory.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-x | autogen.sh | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -1,16 +1,17 @@ #!/bin/sh -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. +PROJECT="gstreamer-vaapi" -PROJECT=gstreamer-vaapi -TEST_TYPE=-d -FILE=gst-libs +test -n "$srcdir" || srcdir="`dirname \"$0\"`" +test -n "$srcdir" || srcdir=. -test $TEST_TYPE $FILE || { - echo "You must run this script in the top-level $PROJECT directory" +if ! test -f "$srcdir/configure.ac"; then + echo "Failed to find the top-level $PROJECT directory" exit 1 -} +fi + +olddir="`pwd`" +cd "$srcdir" mkdir -p m4 @@ -30,6 +31,8 @@ else autoreconf -v --install || exit $? fi +cd "$olddir" + if test -z "$NO_CONFIGURE"; then - ./configure "$@" && echo "Now type 'make' to compile $PROJECT." + $srcdir/configure "$@" && echo "Now type 'make' to compile $PROJECT." fi |