blob: 0b374df97cb014957b79bb4550d78acb007e7fa5 [file] [log] [blame]
Havoc Pennington93cff3d2002-11-21 16:41:33 +00001#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7ORIGDIR=`pwd`
8cd $srcdir
9
10PROJECT=dbus
11TEST_TYPE=-f
12FILE=dbus-1.0.pc.in
13
14DIE=0
15
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
22}
23
24AUTOMAKE=automake-1.6
25ACLOCAL=aclocal-1.6
26
27($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
28 AUTOMAKE=automake
29 ACLOCAL=aclocal
30}
31
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
38}
39
Harri Portendd1fcce2002-12-15 13:02:44 +000040(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
45}
46
Havoc Pennington93cff3d2002-11-21 16:41:33 +000047if test "$DIE" -eq 1; then
48 exit 1
49fi
50
51test $TEST_TYPE $FILE || {
52 echo "You must run this script in the top-level $PROJECT directory"
53 exit 1
54}
55
56if 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."
59fi
60
61libtoolize --copy --force
62
63echo $ACLOCAL $ACLOCAL_FLAGS
64$ACLOCAL $ACLOCAL_FLAGS
65
Havoc Pennington6c45c952002-11-21 19:03:04 +000066## optionally feature autoheader
Havoc Pennington93cff3d2002-11-21 16:41:33 +000067(autoheader --version) < /dev/null > /dev/null 2>&1 && autoheader
68
69$AUTOMAKE -a $am_opt
70autoconf || echo "autoconf failed - version 2.5x is probably required"
71
72cd $ORIGDIR
73
Havoc Pennington6c45c952002-11-21 19:03:04 +000074run_configure=true
75for arg in $*; do
76 case $arg in
77 --no-configure)
78 run_configure=false
79 ;;
80 *)
81 ;;
82 esac
83done
Havoc Pennington93cff3d2002-11-21 16:41:33 +000084
Havoc Pennington6c45c952002-11-21 19:03:04 +000085if $run_configure; then
86 $srcdir/configure --enable-maintainer-mode "$@"
87 echo
88 echo "Now type 'make' to compile $PROJECT."
89else
90 echo
91 echo "Now run 'configure' and 'make' to compile $PROJECT."
92fi
93