Blame SOURCES/php-7.1.24-phpize.patch

c3cddd
diff -up php-7.1.24RC1/scripts/phpize.in.headers php-7.1.24RC1/scripts/phpize.in
c3cddd
--- php-7.1.24RC1/scripts/phpize.in.headers	2018-10-24 08:44:25.000000000 +0200
c3cddd
+++ php-7.1.24RC1/scripts/phpize.in	2018-10-24 09:24:51.810847433 +0200
c3cddd
@@ -162,6 +162,15 @@ phpize_autotools()
a53bc2
   $PHP_AUTOHEADER || exit 1
a53bc2
 }
a53bc2
 
a53bc2
+phpize_check_headers()
a53bc2
+{
a53bc2
+  if test ! -f $includedir/main/php.h; then
a53bc2
+    echo "Can't find PHP headers in $includedir"
a53bc2
+    echo "The php-devel package is required for use of this command."
a53bc2
+    exit 1
a53bc2
+  fi
a53bc2
+}
a53bc2
+
a53bc2
 # Main script
a53bc2
 
c3cddd
 case "$1" in
c3cddd
@@ -180,12 +189,15 @@ case "$1" in
a53bc2
 
a53bc2
   # Version
a53bc2
   --version|-v)
a53bc2
+    phpize_check_headers
a53bc2
     phpize_print_api_numbers
a53bc2
     exit 0
a53bc2
   ;;
a53bc2
 
a53bc2
   # Default
a53bc2
   *)
a53bc2
+     phpize_check_headers
a53bc2
+
a53bc2
      phpize_check_configm4 0
a53bc2
 
a53bc2
      phpize_check_build_files