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