bootstrap.sh 761 B

1234567891011121314151617181920212223242526272829303132333435
  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. # OpenBSD: pkg_add autoconf%2.63 automake%1.9 metaauto
  11. test -n "$AUTOCONF_VERSION" || export AUTOCONF_VERSION=2.63
  12. test -n "$AUTOMAKE_VERSION" || export AUTOMAKE_VERSION=1.9
  13. check_for_app autoconf
  14. check_for_app autoheader
  15. check_for_app automake
  16. check_for_app aclocal
  17. gen_configure() {
  18. echo "Generating the configure script for $1 ..."
  19. shift
  20. aclocal -I "$@"
  21. autoconf
  22. autoheader
  23. automake --add-missing --copy 2>/dev/null
  24. }
  25. gen_configure "Asterisk" autoconf `find third-party -path '*/*/*' -prune -o -type d -print | xargs -I {} echo -I {}`
  26. cd menuselect
  27. gen_configure "menuselect" ../autoconf
  28. exit 0