]> granicus.if.org Git - php/commitdiff
- Added PHP_VERSION_ID == PHP_VERSION as integer value.
authorfoobar <sniper@php.net>
Thu, 27 Jul 2006 08:50:41 +0000 (08:50 +0000)
committerfoobar <sniper@php.net>
Thu, 27 Jul 2006 08:50:41 +0000 (08:50 +0000)
configure.in
main/php_version.h
scripts/man1/php-config.1.in
scripts/php-config.in

index f2564f3f001cb5d0a2eddcb3fe06530dca9017c5..f26f8849aa4e3a69b23650cc6c07e7535c2086c4 100644 (file)
@@ -43,7 +43,8 @@ MAJOR_VERSION=6
 MINOR_VERSION=0
 RELEASE_VERSION=0
 EXTRA_VERSION="-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
@@ -54,7 +55,6 @@ AC_DEFUN([PHP_ALWAYS_SHARED],[])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
@@ -62,6 +62,7 @@ echo "#define PHP_MINOR_VERSION $MINOR_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 && \
@@ -1145,6 +1146,7 @@ PHP_SUBST(OVERALL_TARGET)
 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)
index f801a280e8df8d1ac9cc70686d98696f4fd6ec00..ddc0ef1de3669431ea5331268e5dbc766e84decd 100644 (file)
@@ -5,3 +5,4 @@
 #define PHP_RELEASE_VERSION 0
 #define PHP_EXTRA_VERSION "-dev"
 #define PHP_VERSION "6.0.0-dev"
+#define PHP_VERSION_ID "60000"
index 78d2b4b1fd1db41a373b4822e7b3bbca7edce279..9355b4bc29d2439d4745739488a8b6485372e51b 100644 (file)
@@ -43,6 +43,10 @@ Full path to php CLI/CGI binary
 .B \-\-version
 PHP version
 .TP
+.PD 0
+.B \-\-vernum
+PHP version as integer
+.TP
 .PD 1
 .P
 .SH SEE ALSO
index b53facbdbcbe043dfc7d774bd92481dccc90311e..7937779b138b5605f1e2a786ef651185599ed6cf 100644 (file)
@@ -3,6 +3,7 @@
 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@"
@@ -30,8 +31,10 @@ case "$1" in
        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