ce9965
diff -up ./scripts/phpize.in.headers ./scripts/phpize.in
ce9965
--- ./scripts/phpize.in.headers	2019-07-23 10:05:11.000000000 +0200
ce9965
+++ ./scripts/phpize.in	2019-07-23 10:18:13.648098089 +0200
ce9965
@@ -165,6 +165,15 @@ phpize_autotools()
ce9965
   $PHP_AUTOHEADER || exit 1
ce9965
 }
ce9965
 
ce9965
+phpize_check_headers()
ce9965
+{
ce9965
+  if test ! -f $includedir/main/php.h; then
ce9965
+    echo "Can't find PHP headers in $includedir"
ce9965
+    echo "The php-devel package is required for use of this command."
ce9965
+    exit 1
ce9965
+  fi
ce9965
+}
ce9965
+
ce9965
 # Main script
ce9965
 
ce9965
 case "$1" in
ce9965
@@ -183,12 +192,15 @@ case "$1" in
ce9965
 
ce9965
   # Version
ce9965
   --version|-v)
ce9965
+    phpize_check_headers
ce9965
     phpize_print_api_numbers
ce9965
     exit 0
ce9965
   ;;
ce9965
 
ce9965
   # Default
ce9965
   *)
ce9965
+     phpize_check_headers
ce9965
+
ce9965
      phpize_check_configm4 0
ce9965
 
ce9965
      phpize_check_build_files