Code

Patch to workaround SFnot having libtool installed
[nagiosplug.git] / tools / setup
1 #!/bin/sh
2 #
3 # autogen.sh glue from CMU Cyrus IMAP
4 # $Id$
5 #
6 # Requires: automake, autoconf, dpkg-dev
7 # set -e
9 MAKE=`which gnumake`
10 if test ! -x "$MAKE" ; then MAKE=`which gmake` ; fi
11 if test ! -x "$MAKE" ; then MAKE=`which make` ; fi
12 HAVE_GNU_MAKE=`$MAKE --version|grep -c "Free Software Foundation"`
14 if test "$HAVE_GNU_MAKE" != "1"; then 
15         echo Could not find GNU make on this system, can not proceed with build.
16         exit 1
17 else
18         echo Found GNU Make at $MAKE ... good.
19 fi
21 # This bit is to fix SF's compile server as libtool not installed by default
22 extra=""
23 if test -d $HOME/share/aclocal ; then
24         extra="-I $HOME/share/aclocal"
25 fi
27 autopoint --force
28 aclocal -I m4 $extra
29 libtoolize --force --copy
30 autoheader
31 automake --add-missing --force-missing --copy
32 autoconf
34 if [ -f debian/rules ] ; then
35   chmod +x debian/rules
36 fi
38 # Lots of fiddling as Solaris' which command does give error if which fails
39 docbook=0
40 if [ `uname -s` = "SunOS" ] ; then
41         if [ "`which docbook2html`" = "/"* ] ; then
42                 docbook=1
43         fi
44 else
45         if which docbook2html >/dev/null 2>&1; then
46                 docbook=1
47         fi
48 fi
50 if [ $docbook = 1 ] ; then
51         cd doc && make
52 fi