Blame SOURCES/php-5.4.0-phpize.patch

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