Blame SOURCES/php-7.2.12-phpize.patch

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