summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-01-07 01:40:01 -0500
committerDavid Zeuthen <davidz@redhat.com>2012-01-10 15:01:51 -0500
commit5b11d5e0698e8ee00a96e16bc3547c6d571ef6e1 (patch)
tree6b55a11aab4bc9deed17d065a5d1c1b8d660b5e9 /autogen.sh
parent7f9cddcaed922f7eecbb3782224282b3282bb499 (diff)
downloadpolkit-5b11d5e0698e8ee00a96e16bc3547c6d571ef6e1.tar.gz
Various builddir != srcdir fixes
Fix autogen.sh to work when run from the builddir. Also: switch over to using the gobject-introspection Makefile (which is out-of-tree safe) instead of hardcoding our own version. https://bugs.freedesktop.org/show_bug.cgi?id=44599 Signed-off-by: David Zeuthen <davidz@redhat.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index 462fc35..426e875 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,8 +1,6 @@
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
-touch ChangeLog
-
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
@@ -14,6 +12,11 @@ DIE=0
exit 1
}
+olddir=`pwd`
+cd "$srcdir"
+
+touch ChangeLog
+
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have autoconf installed."
@@ -22,7 +25,7 @@ DIE=0
DIE=1
}
-(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
+(grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null) && {
(libtool --version) < /dev/null > /dev/null 2>&1 || {
echo
echo "**Error**: You must have libtool installed."
@@ -107,6 +110,8 @@ esac
intltoolize --copy --force --automake || exit 1
+cd "$olddir"
+
conf_flags="--enable-maintainer-mode --enable-gtk-doc"
if test x$NOCONFIGURE = x; then