summaryrefslogtreecommitdiff
path: root/scripts/phpize.in
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-06-10 12:33:59 +0000
committerfoobar <sniper@php.net>2005-06-10 12:33:59 +0000
commit058205b67d3e63a525d5b162ef887b58f655a3d0 (patch)
treebe6163b61f14bfa7a1c04ef1f05f7e4b5f7a8ebd /scripts/phpize.in
parentc7b62187e5d1aa8c8142e083ca7e5d975302f6cb (diff)
downloadphp-git-058205b67d3e63a525d5b162ef887b58f655a3d0.tar.gz
- Fix phpize: need to eval path variables for them to be usable
Diffstat (limited to 'scripts/phpize.in')
-rw-r--r--scripts/phpize.in30
1 files changed, 20 insertions, 10 deletions
diff --git a/scripts/phpize.in b/scripts/phpize.in
index 25835a38a6..6db04eeb01 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -1,9 +1,11 @@
#!/bin/sh
# Variable declaration
+EGREP='@EGREP@'
prefix='@prefix@'
-phpdir="@libdir@/build"
-includedir="@includedir@/php"
+exec_prefix="`eval echo @exec_prefix@`"
+phpdir="`eval echo @libdir@`/build"
+includedir="`eval echo @includedir@`/php"
builddir="`pwd`"
FILES_BUILD="mkdep.awk scan_makefile_in.awk shtool libtool.m4"
@@ -50,9 +52,9 @@ phpize_check_configm4()
phpize_get_api_numbers()
{
# extracting API NOs:
- PHP_API_VERSION=`egrep '#define PHP_API_VERSION' $includedir/main/php.h|sed 's/#define PHP_API_VERSION//'`
- ZEND_MODULE_API_NO=`egrep '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO//'`
- ZEND_EXTENSION_API_NO=`egrep '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|sed 's/#define ZEND_EXTENSION_API_NO//'`
+ PHP_API_VERSION=`$EGREP '#define PHP_API_VERSION' $includedir/main/php.h|sed 's/#define PHP_API_VERSION//'`
+ ZEND_MODULE_API_NO=`$EGREP '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO//'`
+ ZEND_EXTENSION_API_NO=`$EGREP '#define ZEND_EXTENSION_API_NO' $includedir/Zend/zend_extensions.h|sed 's/#define ZEND_EXTENSION_API_NO//'`
}
phpize_print_api_numbers()
@@ -64,13 +66,15 @@ phpize_print_api_numbers()
echo "Zend Extension Api No: "$ZEND_EXTENSION_API_NO
}
-phpize_no_shtool()
+phpize_check_build_files()
{
- cat <<EOF
-shtool at '$builddir/build/shtool' not executable.
-Make sure that the file exists and is executable and then rerun this script.
+ if test ! -d "$phpdir"; then
+ cat <<EOF
+Cannot find build files at '$phpdir'. Please check your PHP installation.
EOF
+ exit 1
+ fi
}
phpize_check_shtool()
@@ -78,7 +82,11 @@ phpize_check_shtool()
test -x "$builddir/build/shtool" || chmod +x "$builddir/build/shtool"
if test ! -x "$builddir/build/shtool"; then
- phpize_no_shtool
+ cat <<EOF
+shtool at '$builddir/build/shtool' does not exist or is not executable.
+Make sure that the file exists and is executable and then rerun this script.
+
+EOF
exit 1
else
php_shtool=$builddir/build/shtool
@@ -156,6 +164,8 @@ case "$1" in
*)
phpize_check_configm4 0
+ phpize_check_build_files
+
phpize_print_api_numbers
phpize_copy_files