autogen.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/sh
  2. if [ -d .git ]; then
  3. touch ChangeLog
  4. cp README.md README
  5. fi
  6. TESTLIBTOOLIZE="glibtoolize libtoolize"
  7. LIBTOOLIZEFOUND="0"
  8. srcdir=`dirname $0`
  9. test -z "$srcdir" && srcdir=.
  10. olddir=`pwd`
  11. cd $srcdir
  12. aclocal --version > /dev/null 2> /dev/null || {
  13. echo "error: aclocal not found"
  14. exit 1
  15. }
  16. automake --version > /dev/null 2> /dev/null || {
  17. echo "error: automake not found"
  18. exit 1
  19. }
  20. for i in $TESTLIBTOOLIZE; do
  21. if which $i > /dev/null 2>&1; then
  22. LIBTOOLIZE=$i
  23. LIBTOOLIZEFOUND="1"
  24. break
  25. fi
  26. done
  27. if [ "$LIBTOOLIZEFOUND" = "0" ]; then
  28. echo "$0: need libtoolize tool to build ixion" >&2
  29. exit 1
  30. fi
  31. amcheck=`automake --version | grep 'automake (GNU automake) 1.5'`
  32. if test "x$amcheck" = "xautomake (GNU automake) 1.5"; then
  33. echo "warning: you appear to be using automake 1.5"
  34. echo " this version has a bug - GNUmakefile.am dependencies are not generated"
  35. fi
  36. rm -rf autom4te*.cache
  37. $LIBTOOLIZE --force --copy || {
  38. echo "error: libtoolize failed"
  39. exit 1
  40. }
  41. aclocal -I m4 $ACLOCAL_FLAGS || {
  42. echo "error: aclocal $ACLOCAL_FLAGS failed"
  43. exit 1
  44. }
  45. autoheader || {
  46. echo "error: autoheader failed"
  47. exit 1
  48. }
  49. automake -a -c --foreign || {
  50. echo "warning: automake failed"
  51. }
  52. autoconf || {
  53. echo "error: autoconf failed"
  54. exit 1
  55. }
  56. test x$NOCONFIGURE = x && ./configure $@