setup 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. # This file will be automagically re-generated of present - still looks
  23. # better than having a versioned file change based on automake version
  24. touch build-aux/mkinstalldirs
  25. aclocal -I gl/m4 -I m4 $extra
  26. #libtoolize --force --copy
  27. autoheader
  28. automake --add-missing --force-missing --copy
  29. autoconf
  30. if [ -f debian/rules ] ; then
  31. chmod +x debian/rules
  32. fi
  33. # Lots of fiddling as Solaris' which command does give error if which fails
  34. docbook=0
  35. if [ `uname -s` = "SunOS" ] ; then
  36. if [ "`which docbook2html`" = "/"* ] ; then
  37. docbook=1
  38. fi
  39. else
  40. if which docbook2html >/dev/null 2>&1; then
  41. docbook=1
  42. fi
  43. fi
  44. if [ $docbook = 1 ] ; then
  45. ( cd doc && make )
  46. fi