Don't leak memory in _StringBase and _LongBase repr()
[dbus-python-phuang.git] / autogen.sh
blob1d8a75948cef71ae8b53d0900ad51566d5eb7389
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
4 srcdir=`dirname $0`
5 test -z "$srcdir" && srcdir=.
7 ORIGDIR=`pwd`
8 cd $srcdir
10 PROJECT=dbus-python
11 TEST_TYPE=-f
12 FILE=dbus-python.pc.in
14 DIE=0
16 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
17 echo
18 echo "You must have autoconf installed to compile $PROJECT."
19 echo "Download the appropriate package for your distribution,"
20 echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
21 DIE=1
24 AUTOMAKE=automake-1.9
25 ACLOCAL=aclocal-1.9
27 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
28 AUTOMAKE=automake
29 ACLOCAL=aclocal
32 ($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
33 echo
34 echo "You must have automake installed to compile $PROJECT."
35 echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
36 echo "(or a newer version if it is available)"
37 DIE=1
40 (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
41 echo
42 echo "You must have libtoolize installed to compile $PROJECT."
43 echo "Install the libtool package from ftp.gnu.org or a mirror."
44 DIE=1
47 if test "$DIE" -eq 1; then
48 exit 1
51 test $TEST_TYPE $FILE || {
52 echo "You must run this script in the top-level $PROJECT directory"
53 exit 1
56 if test -z "$*"; then
57 echo "I am going to run ./configure with no arguments - if you wish "
58 echo "to pass any to it, please specify them on the $0 command line."
61 libtoolize --copy --force
63 echo $ACLOCAL $ACLOCAL_FLAGS
64 $ACLOCAL $ACLOCAL_FLAGS
66 ## optionally feature autoheader
67 (autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
69 $AUTOMAKE -a $am_opt
70 autoconf || echo "autoconf failed - version 2.5x is probably required"
72 cd $ORIGDIR
74 run_configure=true
75 for arg in $*; do
76 case $arg in
77 --no-configure)
78 run_configure=false
82 esac
83 done
85 if $run_configure; then
86 $srcdir/configure --enable-maintainer-mode --config-cache "$@"
87 echo
88 echo "Now type 'make' to compile $PROJECT."
89 else
90 echo
91 echo "Now run 'configure' and 'make' to compile $PROJECT."