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