summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2003-07-08 05:36:39 +0000
committerSascha Schumann <sas@php.net>2003-07-08 05:36:39 +0000
commit64e21ed7fa2a6ba13e1598574317eb539c0e8594 (patch)
tree773dfdd9f2d892019892201ec88f4a66786526c9
parentf84233be93b9284fff270d556c3ef1b54bb2fabe (diff)
downloadphp-git-64e21ed7fa2a6ba13e1598574317eb539c0e8594.tar.gz
sync with PHP_4_3
-rw-r--r--scripts/phpize.in50
1 files changed, 33 insertions, 17 deletions
diff --git a/scripts/phpize.in b/scripts/phpize.in
index a81cd5564b..b8ff5623b1 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -12,20 +12,36 @@ CLEAN_FILES="$FILES *.lo *.la *.o .deps .libs/ build/ include/ modules/ install-
aclocal.m4 config.h config.h.in conftest* ltmain.sh libtool config.cache \
config.log config.status Makefile Makefile.fragments Makefile.objects"
-if test ! -r config.m4; then
- echo "Cannot find config.m4. "
- echo "Make sure that you run $0 in the top level source directory of the module"
- exit 1
-fi
-
-# Cleanup
-if test "$1" = "--clean"; then
- echo "Cleaning.."
- for i in $CLEAN_FILES; do
- test -e && rm -rf $i
- done
- exit 0
-fi
+case "$1" in
+ # Cleanup
+ --clean)
+ if test -r config.m4; then
+ echo "Cleaning.."
+ for i in $CLEAN_FILES; do
+ test -e $i && rm -rf $i
+ done
+ exit 0
+ else
+ echo "Cannot find config.m4. "
+ echo "Make sure that you run '$0 --clean' in the top level source directory of the module"
+ echo
+ exit 1
+ fi
+ ;;
+ # Usage
+ --help)
+ echo "Usage: $0 [--clean|--help]"
+ exit 1
+ ;;
+ *)
+ if test ! -r config.m4; then
+ echo "Cannot find config.m4. "
+ echo "Make sure that you run '$0' in the top level source directory of the module"
+ echo
+ exit 1
+ fi
+ ;;
+esac
test -d build || mkdir build
@@ -44,9 +60,9 @@ autoheader || exit 1
libtoolize -f -c || exit 1
# dumping API NOs:
-PHP_API_VERSION=`grep -E '#define PHP_API_VERSION' $includedir/main/php.h|sed 's/#define PHP_API_VERSION//'`
-ZEND_MODULE_API_NO=`grep -E '#define ZEND_MODULE_API_NO' $includedir/Zend/zend_modules.h|sed 's/#define ZEND_MODULE_API_NO//'`
-ZEND_EXTENSION_API_NO=`grep -E '#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//'`
echo "Configuring for:"
echo " PHP Api Version: "$PHP_API_VERSION