summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorJohn (J5) Palmieri <quinticent@localhost.localdomain>2007-01-03 17:35:57 -0500
committerJohn (J5) Palmieri <quinticent@localhost.localdomain>2007-01-03 17:35:57 -0500
commitd0004b6162a18c3d9f02dbc4404f8f452f1c3e79 (patch)
treead7c66cb75e1498c47b665722039673da4604a17 /autogen.sh
parent5b8c9eb452b78ed56b395193f6989ad87eae111b (diff)
fix autogen.sh to run all the correct steps that jhbuild expects
* copy autogen.sh from D-Bus core * add JH_ADD_CFLAG, AM_CHECK_PYTHON_HEADERS and AM_CHECK_PYMOD m4 macros to acinclude.m4
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh94
1 files changed, 91 insertions, 3 deletions
diff --git a/autogen.sh b/autogen.sh
index 57c617c..1d8a759 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,5 +1,93 @@
#!/bin/sh
-if test -z "$ACLOCAL"; then
- ACLOCAL="aclocal"
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+ORIGDIR=`pwd`
+cd $srcdir
+
+PROJECT=dbus-python
+TEST_TYPE=-f
+FILE=dbus-python.pc.in
+
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have autoconf installed to compile $PROJECT."
+ echo "Download the appropriate package for your distribution,"
+ echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+ DIE=1
+}
+
+AUTOMAKE=automake-1.9
+ACLOCAL=aclocal-1.9
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+ AUTOMAKE=automake
+ ACLOCAL=aclocal
+}
+
+($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have automake installed to compile $PROJECT."
+ echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
+ echo "(or a newer version if it is available)"
+ DIE=1
+}
+
+(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
+ echo
+ echo "You must have libtoolize installed to compile $PROJECT."
+ echo "Install the libtool package from ftp.gnu.org or a mirror."
+ DIE=1
+}
+
+if test "$DIE" -eq 1; then
+ exit 1
fi
-ACLOCAL="$ACLOCAL -I autotools" autoreconf -f -i
+
+test $TEST_TYPE $FILE || {
+ echo "You must run this script in the top-level $PROJECT directory"
+ exit 1
+}
+
+if test -z "$*"; then
+ echo "I am going to run ./configure with no arguments - if you wish "
+ echo "to pass any to it, please specify them on the $0 command line."
+fi
+
+libtoolize --copy --force
+
+echo $ACLOCAL $ACLOCAL_FLAGS
+$ACLOCAL $ACLOCAL_FLAGS
+
+## optionally feature autoheader
+(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
+
+$AUTOMAKE -a $am_opt
+autoconf || echo "autoconf failed - version 2.5x is probably required"
+
+cd $ORIGDIR
+
+run_configure=true
+for arg in $*; do
+ case $arg in
+ --no-configure)
+ run_configure=false
+ ;;
+ *)
+ ;;
+ esac
+done
+
+if $run_configure; then
+ $srcdir/configure --enable-maintainer-mode --config-cache "$@"
+ echo
+ echo "Now type 'make' to compile $PROJECT."
+else
+ echo
+ echo "Now run 'configure' and 'make' to compile $PROJECT."
+fi
+