setup 1.1 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. # Refresh GNU autotools toolchain.
  19. for i in config.guess config.sub missing install-sh mkinstalldirs ; do
  20. test -r /usr/share/automake/${i} && {
  21. rm -f ${i}
  22. cp /usr/share/automake/${i} .
  23. }
  24. chmod 755 ${i}
  25. done
  26. aclocal -I lib
  27. autoheader
  28. automake --add-missing --copy
  29. autoconf
  30. autopoint --force
  31. if [ -f debian/rules ] ; then
  32. chmod +x debian/rules
  33. fi
  34. # Lots of fiddling as Solaris' which command does give error if which fails
  35. docbook=0
  36. if [ `uname -s` = "SunOS" ] ; then
  37. if [ "`which docbook2html`" = "/"* ] ; then
  38. docbook=1
  39. fi
  40. else
  41. if which docbook2html ; then
  42. docbook=1
  43. fi
  44. fi
  45. if [ $docbook = 1 ] ; then
  46. cd doc && make
  47. fi