setup 928 B

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