OSDN Git Service

Merge remote-tracking branch 'upstream/master'
[swfed/swfed.git] / src / version-lib.m4
index c82f9c0..496a6bf 100644 (file)
@@ -2,7 +2,7 @@ dnl Check PHP version:
 dnl ref) https://github.com/kjdev/php-ext-jq/blob/master/config.m4
 AC_MSG_CHECKING(PHP version)
 if test ! -z "$phpincludedir"; then
-    PHP_VERSION=`grep 'PHP_VERSION ' $phpincludedir/main/php_version.h | sed -e 's/.*"\([[0-9\.]]*\)".*/\1/g' 2>/dev/null`
+    PHP_VERSION=`grep 'PHP_VERSION ' $phpincludedir/main/php_version.h | sed -e 's/.*"\([[0-9\.]]*\)[["-]].*/\1/g' 2>/dev/null`
 elif test ! -z "$PHP_CONFIG"; then
     PHP_VERSION=`$PHP_CONFIG --version 2>/dev/null`
 fi
@@ -22,4 +22,4 @@ fi
 
 if test $PHP_MAJOR_VERSION -eq 5 -a $PHP_MINOR_VERSION -lt 1; then
     AC_MSG_ERROR([need at least PHP 5.1 or newer])
-fi
\ No newline at end of file
+fi