bootstrap.sh 814 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/sh
  2. check_for_app() {
  3. $1 --version 2>&1 >/dev/null
  4. if [ $? != 0 ]
  5. then
  6. echo "Please install $1 and run bootstrap.sh again!"
  7. exit 1
  8. fi
  9. }
  10. uname -s | grep -q FreeBSD
  11. if [ $? = 0 ]
  12. then
  13. check_for_app autoconf259
  14. check_for_app autoheader259
  15. check_for_app automake19
  16. check_for_app aclocal19
  17. echo "Generating the configure script ..."
  18. aclocal19 -I ../autoconf 2>/dev/null
  19. autoconf259
  20. autoheader259
  21. automake19 --add-missing --copy 2>/dev/null
  22. else
  23. AUTOCONF_VERSION=2.59
  24. AUTOMAKE_VERSION=1.9
  25. export AUTOCONF_VERSION
  26. export AUTOMAKE_VERSION
  27. check_for_app autoconf
  28. check_for_app autoheader
  29. check_for_app automake
  30. check_for_app aclocal
  31. echo "Generating the configure script ..."
  32. aclocal -I ../autoconf 2>/dev/null
  33. autoconf
  34. autoheader
  35. automake --add-missing --copy 2>/dev/null
  36. fi
  37. exit 0