xref: /PHP-7.3/build/buildcheck.sh (revision 9f5cb626)
1#! /bin/sh
2#  +----------------------------------------------------------------------+
3#  | PHP Version 7                                                        |
4#  +----------------------------------------------------------------------+
5#  | Copyright (c) 1997-2018 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
19echo "buildconf: checking installation..."
20
21stamp=$1
22
23# Allow the autoconf executable to be overridden by $PHP_AUTOCONF.
24if test -z "$PHP_AUTOCONF"; then
25  PHP_AUTOCONF='autoconf'
26fi
27
28# autoconf 2.68 or newer
29ac_version=`$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
30if test -z "$ac_version"; then
31echo "buildconf: autoconf not found." >&2
32echo "           You need autoconf version 2.68 or newer installed" >&2
33echo "           to build PHP from Git." >&2
34exit 1
35fi
36IFS=.; set $ac_version; IFS=' '
37if test "$1" = "2" -a "$2" -lt "68" || test "$1" -lt "2"; then
38echo "buildconf: autoconf version $ac_version found." >&2
39echo "           You need autoconf version 2.68 or newer installed" >&2
40echo "           to build PHP from Git." >&2
41exit 1
42else
43echo "buildconf: autoconf version $ac_version (ok)"
44fi
45
46test -n "$stamp" && touch $stamp
47
48exit 0
49