summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorfoobar <sniper@php.net>2005-05-07 02:51:53 +0000
committerfoobar <sniper@php.net>2005-05-07 02:51:53 +0000
commit626253940ea0c246984e277b6786b4950b69e3cc (patch)
treeb5cc4006315847c774ea646c8839b4a2531cc823 /acinclude.m4
parentdeacfcefc2cce245ef08ef949a21aa2bb0f32fd0 (diff)
downloadphp-git-626253940ea0c246984e277b6786b4950b69e3cc.tar.gz
- Added PHP_INSTALL_HEADERS() macro
- Fixed several VPATH build issues - Changed all awk calls to use $AWK - Changed all mkdir calls to use "$php_shtool mkdir"
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m437
1 files changed, 32 insertions, 5 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index bdd64d1428..75dedace14 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -138,7 +138,7 @@ dnl PHP_INIT_BUILD_SYSTEM
dnl
AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[
AC_REQUIRE([PHP_CANONICAL_HOST_TARGET])dnl
-test -d include || mkdir include
+test -d include || $php_shtool mkdir include
> Makefile.objects
> Makefile.fragments
dnl We need to play tricks here to avoid matching the grep line itself
@@ -901,7 +901,11 @@ AC_DEFUN([PHP_EXTENSION],[
])
AC_DEFUN([PHP_ADD_BUILD_DIR],[
- BUILD_DIR="$BUILD_DIR $1"
+ ifelse($2,,[
+ BUILD_DIR="$BUILD_DIR $1"
+ ], [
+ $php_shtool mkdir -p $1
+ ])
])
AC_DEFUN([PHP_GEN_BUILD_DIRS],[
@@ -919,13 +923,13 @@ dnl to build the extension.
dnl "shared" can be set to "shared" or "yes" to build the extension as
dnl a dynamically loadable library. Optional parameter "sapi_class" can
dnl be set to "cli" to mark extension build only with CLI or CGI sapi's.
-dnl extra-cflags are passed to the compiler, with @ext_srcdir@ being
-dnl substituted.
+dnl "extra-cflags" are passed to the compiler, with
+dnl @ext_srcdir@ and @ext_builddir@ being substituted.
AC_DEFUN([PHP_NEW_EXTENSION],[
ext_builddir=[]PHP_EXT_BUILDDIR($1)
ext_srcdir=[]PHP_EXT_SRCDIR($1)
- ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|sed s#@ext_srcdir@#$ext_srcdir#g`])
+ ifelse($5,,ac_extra=,[ac_extra=`echo "$5"|sed s#@ext_srcdir@#$ext_srcdir#g|sed s#@ext_builddir@#$ext_builddir#g`])
if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
dnl ---------------------------------------------- Static module
@@ -2345,6 +2349,29 @@ dnl -------------------------------------------------------------------------
dnl Misc. macros
dnl -------------------------------------------------------------------------
+dnl
+dnl PHP_INSTALL_HEADERS(path [, file ...])
+dnl
+dnl PHP header files to be installed
+dnl
+AC_DEFUN([PHP_INSTALL_HEADERS],[
+ if test -z "$2"; then
+ for header_file in $1; do
+ PHP_RUN_ONCE(INSTALLHEADERS, $header_file, [
+ INSTALL_EXT_HEADERS="$INSTALL_EXT_HEADERS $header_file"
+ ])
+ done
+ else
+ header_path=$1
+ for header_file in $2; do
+ hp_hf="$header_path/$header_file"
+ PHP_RUN_ONCE(INSTALLHEADERS, $hp_hf, [
+ INSTALL_EXT_HEADERS="$INSTALL_EXT_HEADERS $hp_hf"
+ ])
+ done
+ fi
+])
+
dnl
dnl PHP_AP_EXTRACT_VERSION(/path/httpd)
dnl