check_pgsql: update copyright
[monitoring-plugins.git] / tools / setup
blob6da3f674837f6b7fd787a09560e64a4b725d5845
1 #!/bin/sh
3 # autogen.sh glue from CMU Cyrus IMAP
5 # Requires: automake, autoconf, dpkg-dev
6 # set -e
8 MAKE=`which gnumake`
9 if test ! -x "$MAKE" ; then MAKE=`which gmake` ; fi
10 if test ! -x "$MAKE" ; then MAKE=`which make` ; fi
11 HAVE_GNU_MAKE=`$MAKE --version|grep -c "Free Software Foundation"`
13 if test "$HAVE_GNU_MAKE" != "1"; then
14 echo Could not find GNU make on this system, can not proceed with build.
15 exit 1
16 else
17 echo Found GNU Make at $MAKE ... good.
20 # This bit is to fix SF's compile server as libtool not installed by default
21 extra=""
22 if test -d $HOME/share/aclocal ; then
23 extra="-I $HOME/share/aclocal"
26 # This file will be automagically re-generated of present - still looks
27 # better than having a versioned file change based on automake version
28 touch build-aux/mkinstalldirs
30 aclocal -I gl/m4 -I m4 $extra
31 #libtoolize --force --copy
32 autoheader
33 automake --add-missing --force-missing --copy
34 autoconf
36 if [ -f debian/rules ] ; then
37 chmod +x debian/rules
40 # Lots of fiddling as Solaris' which command does give error if which fails
41 docbook=0
42 if [ `uname -s` = "SunOS" ] ; then
43 if [ "`which docbook2html`" = "/"* ] ; then
44 docbook=1
46 else
47 if which docbook2html >/dev/null 2>&1; then
48 docbook=1
52 if [ $docbook = 1 ] ; then
53 ( cd doc && make )