summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh21
1 files changed, 16 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 8bdd622..1247057 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,9 +1,20 @@
#!/bin/sh
-aclocal
-autoheader
-automake --add-missing
-autoconf
+
+olddir=`pwd`
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+(
+ cd "$srcdir"
+
+ aclocal
+ autoheader
+ automake --add-missing
+ autoconf
+
+ cd "$olddir"
+)
if [ -z "$NOCONFIGURE" ]; then
- ./configure "$@"
+ $srcdir/configure "$@"
fi