setup 1.2 KB

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