summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-03 03:55:08 +0300
committerAlberts Muktupāvels <alberts.muktupavels@gmail.com>2016-06-03 03:55:08 +0300
commit320bb7f2f2b9143f871d2ee6061519a955b21ef6 (patch)
tree897a027c7c06d8b3d695e7e3e13462bc11b96bb4 /autogen.sh
parent86e6b0a385e3d458550f18b74a1ef9bbd85549f6 (diff)
downloadmetacity-320bb7f2f2b9143f871d2ee6061519a955b21ef6.tar.gz
build: fix builddir != srcdir
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 4e9c78d1..16a82c9d 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -11,6 +11,9 @@ if [ ! -f $srcdir/configure.ac ]; then
exit 1
fi
+olddir=$(pwd)
+cd "$srcdir"
+
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac")
if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; then
@@ -24,6 +27,8 @@ aclocal --install || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
{ set +x; } 2>/dev/null
+cd "$olddir"
+
if [ -z "$NOCONFIGURE" ]; then
set -x
$srcdir/configure "$@" || exit 1