setup 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #!/bin/sh
  2. #
  3. # autogen.sh glue from CMU Cyrus IMAP
  4. # $Id$
  5. #
  6. # Requires: automake, autoconf, dpkg-dev
  7. # 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"`
  12. if test "$HAVE_GNU_MAKE" != "1"; then
  13. echo Could not find GNU make on this system, can not proceed with build.
  14. exit 1
  15. else
  16. echo Found GNU Make at $MAKE ... good.
  17. fi
  18. # This bit is to fix SF's compile server as libtool not installed by default
  19. extra=""
  20. if test -d $HOME/share/aclocal ; then
  21. extra="-I $HOME/share/aclocal"
  22. fi
  23. aclocal -I gl/m4 -I m4 $extra
  24. #libtoolize --force --copy
  25. autoheader
  26. automake --add-missing --force-missing --copy
  27. autoconf
  28. if [ -f debian/rules ] ; then
  29. chmod +x debian/rules
  30. 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
  42. if [ $docbook = 1 ] ; then
  43. ( cd doc && make )
  44. fi
  45. # Untar libtap
  46. ( cd external && gunzip -c tap-1.01-nagios-plugins.tar.gz | tar -xf - )