• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/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.pc.in
13
14DIE=0
15
16if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
17    echo "Activating pre-commit hook."
18    cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
19    chmod -c +x  .git/hooks/pre-commit
20fi
21
22(autoconf --version) < /dev/null > /dev/null 2>&1 || {
23	echo
24	echo "You must have autoconf installed to compile $PROJECT."
25	echo "Download the appropriate package for your distribution,"
26	echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
27	DIE=1
28}
29
30AUTOMAKE=automake-1.9
31ACLOCAL=aclocal-1.9
32
33($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
34        AUTOMAKE=automake
35        ACLOCAL=aclocal
36}
37
38($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
39	echo
40	echo "You must have automake installed to compile $PROJECT."
41	echo "Get ftp://ftp.cygnus.com/pub/home/tromey/automake-1.2d.tar.gz"
42	echo "(or a newer version if it is available)"
43	DIE=1
44}
45
46(libtoolize --version) < /dev/null > /dev/null 2>&1 || {
47	echo
48	echo "You must have libtoolize installed to compile $PROJECT."
49	echo "Install the libtool package from ftp.gnu.org or a mirror."
50	DIE=1
51}
52
53if test "$DIE" -eq 1; then
54	exit 1
55fi
56
57test $TEST_TYPE $FILE || {
58	echo "You must run this script in the top-level $PROJECT directory"
59	exit 1
60}
61
62if test -z "$*"; then
63	echo "I am going to run ./configure with no arguments - if you wish "
64        echo "to pass any to it, please specify them on the $0 command line."
65fi
66
67libtoolize --copy --force
68
69echo $ACLOCAL $ACLOCAL_FLAGS
70$ACLOCAL $ACLOCAL_FLAGS
71
72## optionally feature autoheader
73(autoheader --version)  < /dev/null > /dev/null 2>&1 && autoheader
74
75$AUTOMAKE -a $am_opt
76autoconf || echo "autoconf failed - version 2.5x is probably required"
77
78cd $ORIGDIR
79
80run_configure=true
81for arg in $*; do
82    case $arg in
83        --no-configure)
84            run_configure=false
85            ;;
86        *)
87            ;;
88    esac
89done
90
91if $run_configure; then
92    $srcdir/configure --enable-maintainer-mode --config-cache "$@"
93    echo
94    echo "Now type 'make' to compile $PROJECT."
95else
96    echo
97    echo "Now run 'configure' and 'make' to compile $PROJECT."
98fi
99
100