987f92
--- php-5.4.0RC5/scripts/phpize.in.orig	2012-01-18 17:13:54.018022983 +0100
987f92
+++ php-5.4.0RC5/scripts/phpize.in	2012-01-18 17:14:40.614024941 +0100
987f92
@@ -162,6 +162,15 @@
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
 
987f92
 case "$1" in 
987f92
@@ -180,12 +189,15 @@
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