buildcheck.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #! /bin/sh
  2. echo "buildconf: checking installation..."
  3. # any python
  4. python=`build/PrintPath python`
  5. if test -z "$python"; then
  6. echo "buildconf: python not found."
  7. echo " You need python installed"
  8. echo " to build APR from SVN."
  9. exit 1
  10. else
  11. py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
  12. echo "buildconf: python version $py_version (ok)"
  13. fi
  14. # autoconf 2.50 or newer
  15. ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|sed -e 's/^[^0-9]*//;s/[a-z]* *$//;q'`
  16. if test -z "$ac_version"; then
  17. echo "buildconf: autoconf not found."
  18. echo " You need autoconf version 2.50 or newer installed"
  19. echo " to build APR from SVN."
  20. exit 1
  21. fi
  22. IFS=.; set $ac_version; IFS=' '
  23. if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
  24. echo "buildconf: autoconf version $ac_version found."
  25. echo " You need autoconf version 2.50 or newer installed"
  26. echo " to build APR from SVN."
  27. exit 1
  28. else
  29. echo "buildconf: autoconf version $ac_version (ok)"
  30. fi
  31. # Sample libtool --version outputs:
  32. # ltmain.sh (GNU libtool) 1.3.3 (1.385.2.181 1999/07/02 15:49:11)
  33. # ltmain.sh (GNU libtool 1.1361 2004/01/02 23:10:52) 1.5a
  34. # output is multiline from 1.5 onwards
  35. # Require libtool 1.4 or newer
  36. libtool=`build/PrintPath glibtool libtool libtool15 libtool14`
  37. lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'`
  38. if test -z "$lt_pversion"; then
  39. echo "buildconf: libtool not found."
  40. echo " You need libtool version 1.4 or newer installed"
  41. echo " to build APR from SVN."
  42. exit 1
  43. fi
  44. lt_version=`echo $lt_pversion|sed -e 's/\([a-z]*\)$/.\1/'`
  45. IFS=.; set $lt_version; IFS=' '
  46. lt_status="good"
  47. if test "$1" = "1"; then
  48. if test "$2" -lt "4"; then
  49. lt_status="bad"
  50. fi
  51. fi
  52. if test $lt_status = "good"; then
  53. echo "buildconf: libtool version $lt_pversion (ok)"
  54. exit 0
  55. fi
  56. echo "buildconf: libtool version $lt_pversion found."
  57. echo " You need libtool version 1.4 or newer installed"
  58. echo " to build APR from SVN."
  59. exit 1