MINOR_VERSION=2
RELEASE_VERSION=0
EXTRA_VERSION="RC2-dev"
-VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
+PHP_VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
+PHP_VERSION_ID=`expr [$]MAJOR_VERSION \* 10000 + [$]MINOR_VERSION \* 100 + [$]RELEASE_VERSION`
dnl Define where extension directories are located in the configure context
AC_DEFUN([PHP_EXT_BUILDDIR],[ext/$1])dnl
dnl Setting up the PHP version based on the information above.
dnl -------------------------------------------------------------------------
-PHP_VERSION=$VERSION
echo "/* automatically generated by configure */" > php_version.h.new
echo "/* edit configure.in to change version number */" >> php_version.h.new
echo "#define PHP_MAJOR_VERSION $MAJOR_VERSION" >> php_version.h.new
echo "#define PHP_RELEASE_VERSION $RELEASE_VERSION" >> php_version.h.new
echo "#define PHP_EXTRA_VERSION \"$EXTRA_VERSION\"" >> php_version.h.new
echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
+echo "#define PHP_VERSION_ID $PHP_VERSION_ID" >> php_version.h.new
cmp php_version.h.new $srcdir/main/php_version.h >/dev/null 2>&1
if test $? -ne 0 ; then
rm -f $srcdir/main/php_version.h && mv php_version.h.new $srcdir/main/php_version.h && \
PHP_SUBST(PHP_RPATHS)
PHP_SUBST(PHP_SAPI)
PHP_SUBST_OLD(PHP_VERSION)
+PHP_SUBST_OLD(PHP_VERSION_ID)
PHP_SUBST(SHELL)
PHP_SUBST(SHARED_LIBTOOL)
PHP_SUBST(WARNING_LEVEL)
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "RC2-dev"
#define PHP_VERSION "5.2.0RC2-dev"
+#define PHP_VERSION_ID 50200
prefix="@prefix@"
exec_prefix="@exec_prefix@"
version="@PHP_VERSION@"
+version_id="@PHP_VERSION_ID@"
includedir="@includedir@/php"
includes="-I$includedir -I$includedir/main -I$includedir/TSRM -I$includedir/Zend -I$includedir/ext -I$includedir/ext/date/lib"
ldflags="@PHP_LDFLAGS@"
echo $php_binary;;
--version)
echo $version;;
+--vernum)
+ echo $version_id;;
*)
- echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version]"
+ echo "Usage: $0 [--prefix|--includes|--ldflags|--libs|--extension-dir|--include-dir|--php-binary|--version|--vernum]"
exit 1;;
esac