Code

Support for coreutils lib. Configure tests via m4 scripts from coreutils
[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 autopoint --force
22 aclocal -I m4
23 autoheader
24 automake --add-missing --force-missing --copy
25 autoconf
27 if [ -f debian/rules ] ; then
28   chmod +x debian/rules
29 fi
31 # Lots of fiddling as Solaris' which command does give error if which fails
32 docbook=0
33 if [ `uname -s` = "SunOS" ] ; then
34         if [ "`which docbook2html`" = "/"* ] ; then
35                 docbook=1
36         fi
37 else
38         if which docbook2html >/dev/null 2>&1; then
39                 docbook=1
40         fi
41 fi
43 if [ $docbook = 1 ] ; then
44         cd doc && make
45 fi