autogen.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #! /bin/sh
  2. if [ "$USER" = "root" ]; then
  3. echo "*** You cannot do this as "$USER" please use a normal user account."
  4. exit 1
  5. fi
  6. if test ! -f configure.ac ; then
  7. echo "*** Please invoke this script from directory containing configure.ac."
  8. exit 1
  9. fi
  10. echo "running aclocal"
  11. aclocal
  12. rc=$?
  13. if test $rc -eq 0; then
  14. echo "running libtool"
  15. libtoolize --force --automake --copy
  16. rc=$?
  17. else
  18. echo "An error occured, autogen.sh stopping."
  19. exit $rc
  20. fi
  21. if test $rc -eq 0; then
  22. echo "libtool worked."
  23. else
  24. echo "libtool not found. trying glibtool."
  25. glibtoolize --force --automake --copy
  26. rc=$?
  27. fi
  28. if test $rc -eq 0; then
  29. echo "running automake"
  30. automake --add-missing --copy
  31. rc=$?
  32. else
  33. echo "An error occured, autogen.sh stopping."
  34. exit $rc
  35. fi
  36. if test $rc -eq 0; then
  37. echo "running autoheader"
  38. autoheader
  39. rc=$?
  40. else
  41. echo "An error occured, autogen.sh stopping."
  42. exit $rc
  43. fi
  44. if test $rc -eq 0; then
  45. echo "running autoconf"
  46. autoconf
  47. rc=$?
  48. else
  49. echo "An error occured, autogen.sh stopping."
  50. exit $rc
  51. fi
  52. echo "autogen.sh complete"
  53. exit $rc