carlwgeorge / rpms / php

Forked from rpms/php 2 years ago
Clone
7f2a831
diff -up php-7.3.0RC4/scripts/phpize.in.headers php-7.3.0RC4/scripts/phpize.in
7f2a831
--- php-7.3.0RC4/scripts/phpize.in.headers	2018-10-23 11:32:20.000000000 +0200
7f2a831
+++ php-7.3.0RC4/scripts/phpize.in	2018-10-23 13:35:55.382870481 +0200
7f2a831
@@ -162,6 +162,15 @@ phpize_autotools()
ad1c041
   $PHP_AUTOHEADER || exit 1
ad1c041
 }
ad1c041
 
ad1c041
+phpize_check_headers()
ad1c041
+{
ad1c041
+  if test ! -f $includedir/main/php.h; then
ad1c041
+    echo "Can't find PHP headers in $includedir"
ad1c041
+    echo "The php-devel package is required for use of this command."
ad1c041
+    exit 1
ad1c041
+  fi
ad1c041
+}
ad1c041
+
ad1c041
 # Main script
ad1c041
 
7f2a831
 case "$1" in
7f2a831
@@ -180,12 +189,15 @@ case "$1" in
ad1c041
 
ad1c041
   # Version
ad1c041
   --version|-v)
ad1c041
+    phpize_check_headers
ad1c041
     phpize_print_api_numbers
ad1c041
     exit 0
ad1c041
   ;;
ad1c041
 
ad1c041
   # Default
ad1c041
   *)
ad1c041
+     phpize_check_headers
ad1c041
+
ad1c041
      phpize_check_configm4 0
ad1c041
 
ad1c041
      phpize_check_build_files