setup 953 B

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