diff options
author | foobar <sniper@php.net> | 2005-05-07 02:51:53 +0000 |
---|---|---|
committer | foobar <sniper@php.net> | 2005-05-07 02:51:53 +0000 |
commit | 626253940ea0c246984e277b6786b4950b69e3cc (patch) | |
tree | b5cc4006315847c774ea646c8839b4a2531cc823 | |
parent | deacfcefc2cce245ef08ef949a21aa2bb0f32fd0 (diff) | |
download | php-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"
-rw-r--r-- | Makefile.global | 2 | ||||
-rw-r--r-- | acinclude.m4 | 37 | ||||
-rw-r--r-- | configure.in | 1 | ||||
-rw-r--r-- | ext/curl/config.m4 | 2 | ||||
-rw-r--r-- | ext/dom/config.m4 | 1 | ||||
-rw-r--r-- | ext/iconv/config.m4 | 1 | ||||
-rw-r--r-- | ext/interbase/php_ibase_udf.c | 4 | ||||
-rw-r--r-- | ext/libxml/config0.m4 | 1 | ||||
-rw-r--r-- | ext/mbstring/config.m4 | 1 | ||||
-rw-r--r-- | ext/odbc/config.m4 | 8 | ||||
-rw-r--r-- | ext/pdo/Makefile.frag | 32 | ||||
-rwxr-xr-x | ext/pdo/config.m4 | 2 | ||||
-rw-r--r-- | ext/pdo_sqlite/config.m4 | 20 | ||||
-rw-r--r-- | ext/session/config.m4 | 2 | ||||
-rw-r--r-- | ext/sqlite/config.m4 | 35 | ||||
-rw-r--r-- | ext/xml/config.m4 | 3 | ||||
-rw-r--r-- | sapi/embed/config.m4 | 1 | ||||
-rw-r--r-- | scripts/Makefile.frag | 22 | ||||
-rw-r--r-- | scripts/phpize.m4 | 8 |
19 files changed, 88 insertions, 95 deletions
diff --git a/Makefile.global b/Makefile.global index e30bc42f78..a76e766433 100644 --- a/Makefile.global +++ b/Makefile.global @@ -5,6 +5,8 @@ INSTALL_DATA = $(INSTALL) -m 644 DEFS = -DPHP_ATOM_INC -I$(top_builddir)/include -I$(top_builddir)/main -I$(top_srcdir) COMMON_FLAGS = $(DEFS) $(INCLUDES) $(EXTRA_INCLUDES) $(CPPFLAGS) $(PHP_FRAMEWORKPATH) +CORE_HEADERS = Zend/ TSRM/ include/ main/ main/streams/ regex/ ext/standard/ +INSTALL_HEADERS = $(CORE_HEADERS) $(INSTALL_EXT_HEADERS) all: $(all_targets) @echo 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 diff --git a/configure.in b/configure.in index b39c3bd888..04f6c3b5bb 100644 --- a/configure.in +++ b/configure.in @@ -1122,6 +1122,7 @@ PHP_SUBST(WARNING_LEVEL) PHP_SUBST(PHP_FRAMEWORKS) PHP_SUBST(PHP_FRAMEWORKPATH) PHP_SUBST_OLD(SHLIB_SUFFIX_NAME) +PHP_SUBST(INSTALL_EXT_HEADERS) old_CC=$CC diff --git a/ext/curl/config.m4 b/ext/curl/config.m4 index 689b6e2405..0c091cbeb2 100644 --- a/ext/curl/config.m4 +++ b/ext/curl/config.m4 @@ -41,7 +41,7 @@ if test "$PHP_CURL" != "no"; then fi curl_version_full=`$CURL_CONFIG --version` - curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | awk 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` + curl_version=`echo ${curl_version_full} | sed -e 's/libcurl //' | $AWK 'BEGIN { FS = "."; } { printf "%d", ($1 * 1000 + $2) * 1000 + $3;}'` if test "$curl_version" -ge 7010005; then AC_MSG_RESULT($curl_version_full) CURL_LIBS=`$CURL_CONFIG --libs` diff --git a/ext/dom/config.m4 b/ext/dom/config.m4 index e6a2cc6bed..f07944569b 100644 --- a/ext/dom/config.m4 +++ b/ext/dom/config.m4 @@ -30,6 +30,7 @@ if test "$PHP_DOM" != "no"; then typeinfo.c domerror.c domlocator.c namednodemap.c userdatahandler.c], $ext_shared) PHP_SUBST(DOM_SHARED_LIBADD) + PHP_INSTALL_HEADERS([ext/dom/xml_common.h]) PHP_ADD_EXTENSION_DEP(dom, libxml) ], [ AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.]) diff --git a/ext/iconv/config.m4 b/ext/iconv/config.m4 index a47bc382e9..40f68bd484 100644 --- a/ext/iconv/config.m4 +++ b/ext/iconv/config.m4 @@ -138,6 +138,7 @@ int main() { PHP_NEW_EXTENSION(iconv, iconv.c, $ext_shared,, [-I\"$PHP_ICONV_PREFIX/include\"]) PHP_SUBST(ICONV_SHARED_LIBADD) + PHP_INSTALL_HEADERS([ext/iconv]) else AC_MSG_ERROR(Please reinstall the iconv library.) fi diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c index 26c8882071..d47f6328ee 100644 --- a/ext/interbase/php_ibase_udf.c +++ b/ext/interbase/php_ibase_udf.c @@ -124,8 +124,8 @@ pthread_mutex_t mtx_res = PTHREAD_MUTEX_INITIALIZER; #endif #ifdef PHP_EMBED -# include "php_main.h" -# include "php_embed.h" +# include "php_main.h" +# include "sapi/embed/php_embed.h" static void __attribute__((constructor)) init() { diff --git a/ext/libxml/config0.m4 b/ext/libxml/config0.m4 index ecab8c1d2f..5f23caae08 100644 --- a/ext/libxml/config0.m4 +++ b/ext/libxml/config0.m4 @@ -18,6 +18,7 @@ if test "$PHP_LIBXML" != "no"; then PHP_SETUP_LIBXML(LIBXML_SHARED_LIBADD, [ AC_DEFINE(HAVE_LIBXML,1,[ ]) PHP_NEW_EXTENSION(libxml, [libxml.c], $ext_shared) + PHP_INSTALL_HEADERS([ext/libxml/php_libxml.h]) ], [ AC_MSG_ERROR([xml2-config not found. Please check your libxml2 installation.]) ]) diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index 679664069e..6035823bd7 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -273,6 +273,7 @@ if test "$PHP_MBSTRING" != "no"; then dnl libmbfl is required PHP_MBSTRING_SETUP_LIBMBFL PHP_MBSTRING_EXTENSION + PHP_INSTALL_HEADERS([ext/mbstring], [libmbfl libmbfl/mbfl]) fi # vim600: sts=2 sw=2 et diff --git a/ext/odbc/config.m4 b/ext/odbc/config.m4 index b02eac556a..0c1ee03dfb 100644 --- a/ext/odbc/config.m4 +++ b/ext/odbc/config.m4 @@ -517,15 +517,15 @@ AC_ARG_WITH(dbmaker, PHP_WITH_SHARED if test "$withval" = "yes"; then # find dbmaker's home directory - DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | awk -F: '{print $6}'` + DBMAKER_HOME=`grep "^dbmaker:" /etc/passwd | $AWK -F: '{print $6}'` # check DBMaker version (from 5.0 to 2.0) DBMAKER_VERSION=5.0 while test ! -d $DBMAKER_HOME/$DBMAKER_VERSION -a "$DBMAKER_VERSION" != "2.9"; do - DM_VER=`echo $DBMAKER_VERSION | sed -e 's/\.//' | awk '{ print $1-1;}'` - MAJOR_V=`echo $DM_VER | awk '{ print $1/10; }' | awk -F. '{ print $1; }'` - MINOR_V=`echo $DM_VER | awk '{ print $1%10; }'` + DM_VER=`echo $DBMAKER_VERSION | sed -e 's/\.//' | $AWK '{ print $1-1;}'` + MAJOR_V=`echo $DM_VER | $AWK '{ print $1/10; }' | $AWK -F. '{ print $1; }'` + MINOR_V=`echo $DM_VER | $AWK '{ print $1%10; }'` DBMAKER_VERSION=$MAJOR_V.$MINOR_V done diff --git a/ext/pdo/Makefile.frag b/ext/pdo/Makefile.frag deleted file mode 100644 index 9af532d833..0000000000 --- a/ext/pdo/Makefile.frag +++ /dev/null @@ -1,32 +0,0 @@ -phpincludedir=$(prefix)/include/php - -PDO_HEADER_FILES= \ - php_pdo.h \ - php_pdo_driver.h - -install-pdo-headers: - @echo "Installing PDO headers: $(INSTALL_ROOT)$(phpincludedir)/ext/pdo/" - @$(mkinstalldirs) $(INSTALL_ROOT)$(phpincludedir)/ext/pdo - @for f in $(PDO_HEADER_FILES); do \ - if test -f "$(top_srcdir)/$$f"; then \ - $(INSTALL_DATA) $(top_srcdir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ - elif test -f "$(top_builddir)/$$f"; then \ - $(INSTALL_DATA) $(top_builddir)/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ - elif test -f "$(top_srcdir)/ext/pdo/$$f"; then \ - $(INSTALL_DATA) $(top_srcdir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ - elif test -f "$(top_builddir)/ext/pdo/$$f"; then \ - $(INSTALL_DATA) $(top_builddir)/ext/pdo/$$f $(INSTALL_ROOT)$(phpincludedir)/ext/pdo; \ - else \ - echo "hmmm"; \ - fi \ - done; - -# mini hack -install: $(all_targets) $(install_targets) install-pdo-headers - -#$(top_srcdir)/ext/pdo/pdo_sql_parser.c: $(top_srcdir)/ext/pdo/pdo_sql_parser.re -# exit 0; re2c -b $(top_srcdir)/ext/pdo/pdo_sql_parser.re > $@ - -#$(srcdir)/pdo_sql_parser.c: $(srcdir)/pdo_sql_parser.re -# exit 0; re2c -b $(srcdir)/pdo_sql_parser.re > $@ - diff --git a/ext/pdo/config.m4 b/ext/pdo/config.m4 index 425aaffe3e..2441499a74 100755 --- a/ext/pdo/config.m4 +++ b/ext/pdo/config.m4 @@ -51,5 +51,5 @@ for more detail on this issue. esac fi PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared) - PHP_ADD_MAKEFILE_FRAGMENT + PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h]) fi diff --git a/ext/pdo_sqlite/config.m4 b/ext/pdo_sqlite/config.m4 index 1347716d30..5a84ae52cd 100644 --- a/ext/pdo_sqlite/config.m4 +++ b/ext/pdo_sqlite/config.m4 @@ -64,7 +64,6 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core, $ext_shared,,-I$pdo_inc_path) else # use bundled libs - PHP_PDO_SQLITE_CFLAGS="-I@ext_srcdir@/sqlite/src" pdo_sqlite_sources="sqlite/src/attach.c sqlite/src/auth.c sqlite/src/btree.c \ sqlite/src/build.c sqlite/src/date.c sqlite/src/delete.c sqlite/src/expr.c \ sqlite/src/func.c sqlite/src/hash.c sqlite/src/insert.c sqlite/src/legacy.c \ @@ -79,20 +78,19 @@ if test "$PHP_PDO_SQLITE" != "no"; then PHP_NEW_EXTENSION(pdo_sqlite, $php_pdo_sqlite_sources_core $pdo_sqlite_sources, - $ext_shared,,-I@ext_srcdir@/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR -I$pdo_inc_path) + $ext_shared,,-I@ext_builddir@/sqlite/src -DPDO_SQLITE_BUNDLED=1 -DSQLITE_OMIT_CURSOR -I$pdo_inc_path) - PHP_ADD_BUILD_DIR($ext_builddir/sqlite) - PHP_ADD_BUILD_DIR($ext_builddir/sqlite/src) + PHP_ADD_BUILD_DIR($ext_builddir/sqlite/src, 1) AC_CHECK_SIZEOF(char *,4) AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) PDO_SQLITE_VERSION=`cat $ext_srcdir/sqlite/VERSION` - PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | awk -F. '{printf("%d%03d%03d", $1, $2, $3)}'` - sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_srcdir/sqlite3.h + PDO_SQLITE_VERSION_NUMBER=`echo $PDO_SQLITE_VERSION | $AWK -F. '{printf("%d%03d%03d", $1, $2, $3)}'` + sed -e s/--VERS--/$PDO_SQLITE_VERSION/ -e s/--VERSION-NUMBER--/$PDO_SQLITE_VERSION_NUMBER/ $ext_srcdir/sqlite/src/sqlite.h.in > $ext_builddir/sqlite/src/sqlite3.h if ! test -f $ext_srcdir/sqlite/src/parse.h ; then $CC -o $ext_srcdir/sqlite/tool/lemon $ext_srcdir/sqlite/tool/lemon.c $ext_srcdir/sqlite/tool/lemon $ext_srcdir/sqlite/src/parse.y - cat $ext_srcdir/sqlite/src/parse.h $ext_srcdir/sqlite/src/vdbe.c | awk -f $ext_srcdir/sqlite/mkopcodeh.awk > $ext_srcdir/sqlite/src/opcodes.h - sort -n +2 $ext_srcdir/sqlite/src/opcodes.h | awk -f $ext_srcdir/sqlite/mkopcodec.awk > $ext_srcdir/sqlite/src/opcodes.c + cat $ext_srcdir/sqlite/src/parse.h $ext_srcdir/sqlite/src/vdbe.c | $AWK -f $ext_srcdir/sqlite/mkopcodeh.awk > $ext_srcdir/sqlite/src/opcodes.h + sort -n +2 $ext_srcdir/sqlite/src/opcodes.h | Â$AWK -f $ext_srcdir/sqlite/mkopcodec.awk > $ext_srcdir/sqlite/src/opcodes.c $CC -o $ext_srcdir/sqlite/tool/mkkeywordhash $ext_srcdir/sqlite/tool/mkkeywordhash.c $ext_srcdir/sqlite/tool/mkkeywordhash > $ext_srcdir/sqlite/src/keywordhash.h else @@ -100,11 +98,11 @@ if test "$PHP_PDO_SQLITE" != "no"; then fi if test "$ext_shared" = "no" -o "$ext_srcdir" != "$abs_srcdir"; then - echo '#include "php_config.h"' > $ext_srcdir/sqlite/src/config.h + echo '#include <php_config.h>' > $ext_builddir/sqlite/src/config.h else - echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/sqlite/src/config.h + echo "#include \"$abs_builddir/config.h\"" > $ext_builddir/sqlite/src/config.h fi - cat >> $ext_srcdir/sqlite/src/config.h <<EOF + cat >> $ext_builddir/sqlite/src/config.h <<EOF #if ZTS # define THREADSAFE 1 #endif diff --git a/ext/session/config.m4 b/ext/session/config.m4 index cda321bfc1..1f2dbc58c6 100644 --- a/ext/session/config.m4 +++ b/ext/session/config.m4 @@ -13,6 +13,7 @@ if test "$PHP_SESSION" != "no"; then PHP_PREAD_TEST PHP_NEW_EXTENSION(session, session.c mod_files.c mod_mm.c mod_user.c, $ext_shared) PHP_SUBST(SESSION_SHARED_LIBADD) + PHP_INSTALL_HEADERS(ext/session, [php_session.h mod_files.h mod_user.h]) AC_DEFINE(HAVE_PHP_SESSION,1,[ ]) fi @@ -27,5 +28,6 @@ if test "$PHP_MM" != "no"; then PHP_ADD_LIBRARY_WITH_PATH(mm, $MM_DIR/$PHP_LIBDIR, SESSION_SHARED_LIBADD) PHP_ADD_INCLUDE($MM_DIR/include) + PHP_INSTALL_HEADERS([ext/session/mod_mm.h]) AC_DEFINE(HAVE_LIBMM, 1, [Whether you have libmm]) fi diff --git a/ext/sqlite/config.m4 b/ext/sqlite/config.m4 index 3b44552e94..f457f07136 100644 --- a/ext/sqlite/config.m4 +++ b/ext/sqlite/config.m4 @@ -58,11 +58,13 @@ if test "$PHP_SQLITE" != "no"; then ],[ -L$SQLITE_DIR/$PHP_LIBDIR -lm ]) + SQLITE_MODULE_TYPE=external PHP_SQLITE_CFLAGS=$pdo_inc_path sqlite_extra_sources="libsqlite/src/encode.c" else # use bundled library - PHP_SQLITE_CFLAGS="-I@ext_srcdir@/libsqlite/src $pdo_inc_path" + SQLITE_MODULE_TYPE=builtin + PHP_SQLITE_CFLAGS="-I@ext_builddir@/libsqlite/src $pdo_inc_path" sqlite_extra_sources="libsqlite/src/opcodes.c \ libsqlite/src/parse.c libsqlite/src/encode.c \ libsqlite/src/auth.c libsqlite/src/btree.c libsqlite/src/build.c \ @@ -79,8 +81,18 @@ if test "$PHP_SQLITE" != "no"; then PHP_ADD_EXTENSION_DEP(sqlite, spl) PHP_ADD_EXTENSION_DEP(sqlite, pdo) - PHP_ADD_BUILD_DIR($ext_builddir/libsqlite) - PHP_ADD_BUILD_DIR($ext_builddir/libsqlite/src) + fi + + dnl + dnl Common for both bundled/external + dnl + sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" + PHP_NEW_EXTENSION(sqlite, $sqlite_sources, $ext_shared,,$PHP_SQLITE_CFLAGS) + PHP_SUBST(SQLITE_SHARED_LIBADD) + PHP_INSTALL_HEADERS([$ext_builddir/libsqlite/src/sqlite.h]) + + if test "$SQLITE_MODULE_TYPE" = "builtin"; then + PHP_ADD_BUILD_DIR($ext_builddir/libsqlite/src, 1) AC_CHECK_SIZEOF(char *, 4) AC_DEFINE(SQLITE_PTR_SZ, SIZEOF_CHAR_P, [Size of a pointer]) dnl use latin 1 for SQLite older than 2.8.9; the utf-8 handling @@ -97,15 +109,15 @@ if test "$PHP_SQLITE" != "no"; then SQLITE_VERSION=`cat $ext_srcdir/libsqlite/VERSION` PHP_SUBST(SQLITE_VERSION) - sed -e s/--VERS--/$SQLITE_VERSION/ -e s/--ENCODING--/$SQLITE_ENCODING/ $ext_srcdir/libsqlite/src/sqlite.h.in >$ext_srcdir/libsqlite/src/sqlite.h + sed -e s/--VERS--/$SQLITE_VERSION/ -e s/--ENCODING--/$SQLITE_ENCODING/ $ext_srcdir/libsqlite/src/sqlite.h.in > $ext_builddir/libsqlite/src/sqlite.h if test "$ext_shared" = "no" || test "$ext_srcdir" != "$abs_srcdir"; then - echo '#include <php_config.h>' > $ext_srcdir/libsqlite/src/config.h + echo '#include <php_config.h>' > $ext_builddir/libsqlite/src/config.h else - echo "#include \"$abs_builddir/config.h\"" > $ext_srcdir/libsqlite/src/config.h + echo "#include \"$abs_builddir/config.h\"" > $ext_builddir/libsqlite/src/config.h fi - cat >> $ext_srcdir/libsqlite/src/config.h <<EOF + cat >> $ext_builddir/libsqlite/src/config.h <<EOF #if ZTS # define THREADSAFE 1 #endif @@ -114,14 +126,7 @@ if test "$PHP_SQLITE" != "no"; then #endif EOF fi - - dnl - dnl Common for both bundled/external - dnl - sqlite_sources="sqlite.c sess_sqlite.c pdo_sqlite2.c $sqlite_extra_sources" - PHP_NEW_EXTENSION(sqlite, $sqlite_sources, $ext_shared,,$PHP_SQLITE_CFLAGS) - PHP_SUBST(SQLITE_SHARED_LIBADD) - + AC_CHECK_FUNCS(usleep nanosleep) AC_CHECK_HEADERS(time.h) fi diff --git a/ext/xml/config.m4 b/ext/xml/config.m4 index e77cc4035f..b681f4dce0 100644 --- a/ext/xml/config.m4 +++ b/ext/xml/config.m4 @@ -26,6 +26,7 @@ if test "$PHP_XML" != "no"; then PHP_SETUP_LIBXML(XML_SHARED_LIBADD, [ xml_extra_sources="compat.c" + PHP_ADD_EXTENSION_DEP(xml, libxml) ], [ AC_MSG_ERROR([xml2-config not found. Use --with-libxml-dir=<DIR>]) ]) @@ -53,6 +54,6 @@ if test "$PHP_XML" != "no"; then PHP_NEW_EXTENSION(xml, xml.c $xml_extra_sources, $ext_shared) PHP_SUBST(XML_SHARED_LIBADD) - PHP_ADD_EXTENSION_DEP(xml, libxml) + PHP_INSTALL_HEADERS([ext/xml]) AC_DEFINE(HAVE_XML, 1, [ ]) fi diff --git a/sapi/embed/config.m4 b/sapi/embed/config.m4 index 80fed48d00..4461bc3383 100644 --- a/sapi/embed/config.m4 +++ b/sapi/embed/config.m4 @@ -29,4 +29,5 @@ AC_MSG_RESULT($PHP_EMBED_TYPE) if test "$PHP_EMBED_TYPE" != "no"; then PHP_SELECT_SAPI(embed, $PHP_EMBED_TYPE, php_embed.c) + PHP_INSTALL_HEADERS([sapi/embed/php_embed.h]) fi diff --git a/scripts/Makefile.frag b/scripts/Makefile.frag index 3d476a7608..8dd1d101c4 100644 --- a/scripts/Makefile.frag +++ b/scripts/Makefile.frag @@ -31,32 +31,14 @@ install-build: $(INSTALL) $(BUILD_FILES_EXEC) $(INSTALL_ROOT)$(phpbuilddir) && \ $(INSTALL_DATA) $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir)) -HEADER_DIRS = \ - Zend/ \ - TSRM/ \ - include/ \ - main/ \ - main/streams/ \ - regex/ \ - ext/iconv/ \ - ext/libxml/ \ - ext/standard/ \ - ext/session/ \ - ext/dom/xml_common.h \ - ext/xml/ \ - ext/mbstring/ \ - ext/mbstring/libmbfl/ \ - ext/mbstring/libmbfl/mbfl/ \ - ext/sqlite/libsqlite/src/sqlite.h - install-headers: - -@for i in $(HEADER_DIRS); do \ + -@for i in $(INSTALL_HEADERS); do \ i=`$(top_srcdir)/build/shtool path -d $$i`; \ paths="$$paths $(INSTALL_ROOT)$(phpincludedir)/$$i"; \ done; \ $(mkinstalldirs) $$paths && \ echo "Installing header files: $(INSTALL_ROOT)$(phpincludedir)/" && \ - for i in $(HEADER_DIRS); do \ + for i in $(INSTALL_HEADERS); do \ if test -f "$(top_srcdir)/$$i"; then \ $(INSTALL_DATA) $(top_srcdir)/$$i $(INSTALL_ROOT)$(phpincludedir)/$$i; \ elif test -f "$(top_builddir)/$$i"; then \ diff --git a/scripts/phpize.m4 b/scripts/phpize.m4 index afb555d9c1..5b056f5709 100644 --- a/scripts/phpize.m4 +++ b/scripts/phpize.m4 @@ -2,8 +2,6 @@ dnl This file becomes configure.in for self-contained extensions. AC_INIT(config.m4) -PHP_INIT_BUILD_SYSTEM - AC_DEFUN([PHP_WITH_PHP_CONFIG],[ AC_ARG_WITH(php-config, [ --with-php-config=PATH],[ @@ -19,6 +17,10 @@ AC_DEFUN([PHP_WITH_PHP_CONFIG],[ if test -z "$prefix"; then AC_MSG_ERROR(Cannot find php-config. Please use --with-php-config=PATH) fi + + php_shtool=$srcdir/build/shtool + PHP_INIT_BUILD_SYSTEM + AC_MSG_CHECKING(for PHP prefix) AC_MSG_RESULT($prefix) AC_MSG_CHECKING(for PHP includes) @@ -106,7 +108,7 @@ PHP_SUBST(SHELL) PHP_GEN_BUILD_DIRS PHP_GEN_GLOBAL_MAKEFILE -test -d modules || mkdir modules +test -d modules || $php_shtool mkdir modules touch .deps AC_CONFIG_HEADER(config.h) |