buildcheck.sh 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #! /bin/sh
  2. # +----------------------------------------------------------------------+
  3. # | PHP Version 5 |
  4. # +----------------------------------------------------------------------+
  5. # | Copyright (c) 1997-2016 The PHP Group |
  6. # +----------------------------------------------------------------------+
  7. # | This source file is subject to version 3.01 of the PHP license, |
  8. # | that is bundled with this package in the file LICENSE, and is |
  9. # | available through the world-wide-web at the following url: |
  10. # | http://www.php.net/license/3_01.txt |
  11. # | If you did not receive a copy of the PHP license and are unable to |
  12. # | obtain it through the world-wide-web, please send a note to |
  13. # | license@php.net so we can mail you a copy immediately. |
  14. # +----------------------------------------------------------------------+
  15. # | Authors: Stig Bakken <ssb@php.net> |
  16. # | Sascha Schumann <sascha@schumann.cx> |
  17. # +----------------------------------------------------------------------+
  18. #
  19. # $Id: buildcheck.sh,v 1.37.2.2.2.1 2007-01-01 19:32:10 iliaa Exp $
  20. #
  21. echo "buildconf: checking installation..."
  22. stamp=$1
  23. # Allow the autoconf executable to be overridden by $PHP_AUTOCONF.
  24. if test -z "$PHP_AUTOCONF"; then
  25. PHP_AUTOCONF='autoconf'
  26. fi
  27. # autoconf 2.59 or newer
  28. ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
  29. if test -z "$ac_version"; then
  30. echo "buildconf: autoconf not found."
  31. echo " You need autoconf version 2.59 or newer installed"
  32. echo " to build PHP from Git."
  33. exit 1
  34. fi
  35. IFS=.; set $ac_version; IFS=' '
  36. if test "$1" = "2" -a "$2" -lt "59" || test "$1" -lt "2"; then
  37. echo "buildconf: autoconf version $ac_version found."
  38. echo " You need autoconf version 2.59 or newer installed"
  39. echo " to build PHP from Git."
  40. exit 1
  41. else
  42. echo "buildconf: autoconf version $ac_version (ok)"
  43. fi
  44. test -n "$stamp" && touch $stamp
  45. exit 0