summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Bastien Nocera2017-09-15 16:18:50 +0200
committerGravatar Nikias Bassen2018-04-27 19:24:36 +0200
commit26373b334889f5ae2e2737ff447eb25b1700fa2f (patch)
tree8ab80618478299c6412b7829ba8ec2988041bbb4
parent99f4a332bbfa6886e300318381cb9efa972ca0ac (diff)
downloadlibimobiledevice-26373b334889f5ae2e2737ff447eb25b1700fa2f.tar.gz
libimobiledevice-26373b334889f5ae2e2737ff447eb25b1700fa2f.tar.bz2
build: Fix autogen.sh with srcdir != builddir
-rwxr-xr-xautogen.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/autogen.sh b/autogen.sh
index 3292973..f45d20f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,11 @@
#!/bin/sh
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+cd "$srcdir"
+
gprefix=`which glibtoolize 2>&1 >/dev/null`
if [ $? -eq 0 ]; then
glibtoolize --force
@@ -10,6 +17,8 @@ autoheader
automake --add-missing
autoconf
+cd "$olddir"
+
if [ -z "$NOCONFIGURE" ]; then
- ./configure "$@"
+ $srcdir/configure "$@"
fi