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