Home | History | Annotate | Download | only in dbus
      1 #!/bin/sh
      2 # Run this to generate all the initial makefiles, etc.
      3 
      4 srcdir=`dirname $0`
      5 test -z "$srcdir" && srcdir=.
      6 
      7 ORIGDIR=`pwd`
      8 cd $srcdir
      9 
     10 PROJECT=dbus
     11 TEST_TYPE=-f
     12 FILE=dbus-1.pc.in
     13 
     14 DIE=0
     15 
     16 if [ -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
     20 fi
     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 
     30 AUTOMAKE=automake-1.9
     31 ACLOCAL=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 
     53 if test "$DIE" -eq 1; then
     54 	exit 1
     55 fi
     56 
     57 test $TEST_TYPE $FILE || {
     58 	echo "You must run this script in the top-level $PROJECT directory"
     59 	exit 1
     60 }
     61 
     62 if 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."
     65 fi
     66 
     67 libtoolize --copy --force
     68 
     69 echo $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
     76 autoconf || echo "autoconf failed - version 2.5x is probably required"
     77 
     78 cd $ORIGDIR
     79 
     80 run_configure=true
     81 for arg in $*; do
     82     case $arg in 
     83         --no-configure)
     84             run_configure=false
     85             ;;
     86         *)
     87             ;;
     88     esac
     89 done
     90 
     91 if $run_configure; then
     92     $srcdir/configure --enable-maintainer-mode --config-cache "$@"
     93     echo 
     94     echo "Now type 'make' to compile $PROJECT."
     95 else
     96     echo
     97     echo "Now run 'configure' and 'make' to compile $PROJECT."
     98 fi
     99 
    100