summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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