196963
--- php-5.4.0RC5/scripts/phpize.in.orig	2012-01-18 17:13:54.018022983 +0100
196963
+++ php-5.4.0RC5/scripts/phpize.in	2012-01-18 17:14:40.614024941 +0100
196963
@@ -162,6 +162,15 @@
196963
   $PHP_AUTOHEADER || exit 1
196963
 }
196963
 
196963
+phpize_check_headers()
196963
+{
196963
+  if test ! -f $includedir/main/php.h; then
196963
+    echo "Can't find PHP headers in $includedir"
196963
+    echo "The php-devel package is required for use of this command."
196963
+    exit 1
196963
+  fi
196963
+}
196963
+
196963
 # Main script
196963
 
196963
 case "$1" in 
196963
@@ -180,12 +189,15 @@
196963
 
196963
   # Version
196963
   --version|-v)
196963
+    phpize_check_headers
196963
     phpize_print_api_numbers
196963
     exit 0
196963
   ;;
196963
 
196963
   # Default
196963
   *)
196963
+     phpize_check_headers
196963
+
196963
      phpize_check_configm4 0
196963
 
196963
      phpize_check_build_files