diff options
| -rw-r--r-- | .deps | 0 | ||||
| -rw-r--r-- | Makefile | 126 | ||||
| -rw-r--r-- | Makefile.fragments | 0 | ||||
| -rw-r--r-- | Makefile.global | 82 | ||||
| -rw-r--r-- | Makefile.objects | 8 | ||||
| -rw-r--r-- | acinclude.m4 | 1847 | ||||
| -rw-r--r-- | aclocal.m4 | 7708 | ||||
| -rw-r--r-- | build/mkdep.awk | 75 | ||||
| -rwxr-xr-x | build/scan_makefile_in.awk | 32 | ||||
| -rwxr-xr-x | build/shtool | 1046 | ||||
| -rwxr-xr-x | config.guess | 1407 | ||||
| -rw-r--r-- | config.h | 62 | ||||
| -rw-r--r-- | config.h.in | 61 | ||||
| -rw-r--r-- | config.log | 356 | ||||
| -rwxr-xr-x | config.nice | 8 | ||||
| -rwxr-xr-x | config.status | 611 | ||||
| -rwxr-xr-x | config.sub | 1504 | ||||
| -rwxr-xr-x | configure | 19730 | ||||
| -rw-r--r-- | configure.in | 116 | ||||
| -rw-r--r-- | include/php_php_imlib_filter_path.h | 1 | ||||
| -rw-r--r-- | install-sh | 0 | ||||
| -rw-r--r-- | libs.mk | 7 | ||||
| -rwxr-xr-x | libtool | 6939 | ||||
| -rwxr-xr-x | ltmain.sh | 6303 | ||||
| -rw-r--r-- | missing | 0 | ||||
| -rw-r--r-- | mkinstalldirs | 0 | ||||
| -rw-r--r-- | scan_makefile_in.awk | 32 |
27 files changed, 0 insertions, 48061 deletions
diff --git a/Makefile b/Makefile deleted file mode 100644 index c38e990..0000000 --- a/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -srcdir = /home/pp/php-imlib-0.4pre2 -builddir = /home/pp/php-imlib-0.4pre2 -top_srcdir = /home/pp/php-imlib-0.4pre2 -top_builddir = /home/pp/php-imlib-0.4pre2 -SHLIB_SUFFIX_NAME = so -IMLIB_SHARED_LIBADD = -lt1 -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/X11R6/lib -lImlib2 -lttf -lm -ldl -lXext -lXext -lX11 -shared_objects_imlib = php_imlib.lo -PHP_MODULES = $(phplibdir)/imlib.la -all_targets = $(PHP_MODULES) -install_targets = install-modules -prefix = /usr -exec_prefix = $(prefix) -libdir = ${exec_prefix}/lib -prefix = /usr -phplibdir = /home/pp/php-imlib-0.4pre2/modules -PHP_COMPILE = -CC = gcc -CFLAGS = -g -O2 -CFLAGS_CLEAN = $(CFLAGS) -CPP = gcc -E -CPPFLAGS = -DPHP_IMLIB_FILTER_PATH="\"/usr/lib/php/php_imlib_filters\"" -DHAVE_CONFIG_H -CXX = g++ -DEFS = -EXTENSION_DIR = /usr/lib/php -EXTRA_LDFLAGS = -EXTRA_LIBS = -INCLUDES = -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/Zend -I/usr/include/php/TSRM -I/usr/X11R6/include -LEX = -LEX_OUTPUT_ROOT = -LFLAGS = -LDFLAGS = -lm -SHARED_LIBTOOL = -LIBTOOL = $(SHELL) $(top_builddir)/libtool -SHELL = /bin/sh -AWK = awk -RE2C = exit 0; -mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p -INSTALL = $(top_srcdir)/build/shtool install -c -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) - - -all: $(all_targets) - @echo - @echo "Build complete." - @echo "(It is safe to ignore warnings about tempnam and tmpnam)." - @echo - -build-modules: $(PHP_MODULES) - -libphp_common.la: $(PHP_GLOBAL_OBJS) - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) -avoid-version $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -release $(PHP_VERSION) - -libphp4.la: libphp_common.la $(PHP_SAPI_OBJS) - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) libphp_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ - -libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) - $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so - -install: $(all_targets) $(install_targets) - -install-sapi: $(OVERALL_TARGET) - @echo "Installing PHP SAPI module: $(PHP_SAPI)" - -@$(LIBTOOL) --silent --mode=install cp libphp_common.la $(phptempdir)/libphp_common.la >/dev/null 2>&1 - -@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1 - -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) - -@if test ! -r $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME); then \ - for i in 0.0.0 0.0 0; do \ - if test -r $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME).$$i; then \ - $(LN_S) $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME); \ - break; \ - fi; \ - done; \ - fi - @$(INSTALL_IT) - -install-modules: build-modules - @test -d modules && \ - $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \ - echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \ - rm -f modules/*.la && \ - $(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true - -install-tester: - @echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/" - @$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR) - @$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR) - -install-su: install-pear install-tester - -test: - -@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \ - TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ - TEST_PHP_SRCDIR=$(top_srcdir) \ - CC="$(CC)" \ - $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \ - else \ - echo "ERROR: Cannot run tests without CLI sapi."; \ - fi - -clean: - find . -name \*.lo | xargs rm -f - find . -name \*.o | xargs rm -f - find . -name \*.la | xargs rm -f - find . -name \*.a | xargs rm -f - find . -name \*.so | xargs rm -f - find . -name .libs -a -type d|xargs rm -rf - rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/* - -distclean: clean - rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp - egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f - find . -name Makefile | xargs rm -f - -.PHONY: all clean install distclean test -.NOEXPORT: -php_imlib.lo: /home/pp/php-imlib-0.4pre2/php_imlib.c - $(LIBTOOL) --mode=compile $(CC) -I. -I/home/pp/php-imlib-0.4pre2 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic -c /home/pp/php-imlib-0.4pre2/php_imlib.c -o php_imlib.lo -$(phplibdir)/imlib.la: ./imlib.la - $(LIBTOOL) --mode=install cp ./imlib.la $(phplibdir) - -./imlib.la: $(shared_objects_imlib) $(IMLIB_SHARED_DEPENDENCIES) - $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_imlib) $(IMLIB_SHARED_LIBADD) - diff --git a/Makefile.fragments b/Makefile.fragments deleted file mode 100644 index e69de29..0000000 --- a/Makefile.fragments +++ /dev/null diff --git a/Makefile.global b/Makefile.global deleted file mode 100644 index df6d109..0000000 --- a/Makefile.global +++ /dev/null @@ -1,82 +0,0 @@ -mkinstalldirs = $(top_srcdir)/build/shtool mkdir -p -INSTALL = $(top_srcdir)/build/shtool install -c -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) - - -all: $(all_targets) - @echo - @echo "Build complete." - @echo "(It is safe to ignore warnings about tempnam and tmpnam)." - @echo - -build-modules: $(PHP_MODULES) - -libphp_common.la: $(PHP_GLOBAL_OBJS) - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) -avoid-version $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ -release $(PHP_VERSION) - -libphp4.la: libphp_common.la $(PHP_SAPI_OBJS) - $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath $(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) libphp_common.la $(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ - -libs/libphp4.bundle: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS) - $(CC) $(MH_BUNDLE_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) $(EXTRA_LDFLAGS) $(PHP_GLOBAL_OBJS:.lo=.o) $(PHP_SAPI_OBJS:.lo=.o) $(PHP_FRAMEWORKS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@ && cp $@ libs/libphp4.so - -install: $(all_targets) $(install_targets) - -install-sapi: $(OVERALL_TARGET) - @echo "Installing PHP SAPI module: $(PHP_SAPI)" - -@$(LIBTOOL) --silent --mode=install cp libphp_common.la $(phptempdir)/libphp_common.la >/dev/null 2>&1 - -@$(LIBTOOL) --silent --mode=install cp libphp4.la $(phptempdir)/libphp4.la >/dev/null 2>&1 - -@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir) - -@if test ! -r $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME); then \ - for i in 0.0.0 0.0 0; do \ - if test -r $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME).$$i; then \ - $(LN_S) $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME).$$i $(phptempdir)/libphp_common.$(SHLIB_SUFFIX_NAME); \ - break; \ - fi; \ - done; \ - fi - @$(INSTALL_IT) - -install-modules: build-modules - @test -d modules && \ - $(mkinstalldirs) $(INSTALL_ROOT)$(EXTENSION_DIR) && \ - echo "Installing shared extensions: $(INSTALL_ROOT)$(EXTENSION_DIR)/" && \ - rm -f modules/*.la && \ - $(INSTALL) modules/* $(INSTALL_ROOT)$(EXTENSION_DIR) >/dev/null 2>&1 || true - -install-tester: - @echo "Installing regression tester: $(INSTALL_ROOT)$(PEAR_INSTALLDIR)/" - @$(mkinstalldirs) $(INSTALL_ROOT)$(PEAR_INSTALLDIR) - @$(INSTALL) -m 755 $(top_srcdir)/run-tests.php $(INSTALL_ROOT)$(PEAR_INSTALLDIR) - -install-su: install-pear install-tester - -test: - -@if test -x $(SAPI_CLI_PATH) && test ! -z $(SAPI_CLI_PATH); then \ - TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ - TEST_PHP_SRCDIR=$(top_srcdir) \ - CC="$(CC)" \ - $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' $(top_srcdir)/run-tests.php $(TESTS); \ - else \ - echo "ERROR: Cannot run tests without CLI sapi."; \ - fi - -clean: - find . -name \*.lo | xargs rm -f - find . -name \*.o | xargs rm -f - find . -name \*.la | xargs rm -f - find . -name \*.a | xargs rm -f - find . -name \*.so | xargs rm -f - find . -name .libs -a -type d|xargs rm -rf - rm -f libphp4.la $(SAPI_CLI_PATH) $(OVERALL_TARGET) modules/* libs/* - -distclean: clean - rm -f config.cache config.log config.status Makefile.objects Makefile.fragments libtool main/php_config.h stamp-h php4.spec sapi/apache/libphp4.module buildmk.stamp - egrep define'.*include/php' configure|sed 's/.*>//'|xargs rm -f - find . -name Makefile | xargs rm -f - -.PHONY: all clean install distclean test -.NOEXPORT: diff --git a/Makefile.objects b/Makefile.objects deleted file mode 100644 index 00f882c..0000000 --- a/Makefile.objects +++ /dev/null @@ -1,8 +0,0 @@ -php_imlib.lo: /home/pp/php-imlib-0.4pre2/php_imlib.c - $(LIBTOOL) --mode=compile $(CC) -I. -I/home/pp/php-imlib-0.4pre2 $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) -prefer-pic -c /home/pp/php-imlib-0.4pre2/php_imlib.c -o php_imlib.lo -$(phplibdir)/imlib.la: ./imlib.la - $(LIBTOOL) --mode=install cp ./imlib.la $(phplibdir) - -./imlib.la: $(shared_objects_imlib) $(IMLIB_SHARED_DEPENDENCIES) - $(LIBTOOL) --mode=link $(CC) $(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) $(LDFLAGS) -o $@ -export-dynamic -avoid-version -prefer-pic -module -rpath $(phplibdir) $(EXTRA_LDFLAGS) $(shared_objects_imlib) $(IMLIB_SHARED_LIBADD) - diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index a2ce632..0000000 --- a/acinclude.m4 +++ /dev/null @@ -1,1847 +0,0 @@ -dnl $Id: acinclude.m4,v 1.218.2.31 2003/10/03 04:29:24 sniper Exp $ -dnl -dnl This file contains local autoconf functions. - -dnl PHP_ADD_MAKEFILE_FRAGMENT([srcfile[, ext_srcdir[, ext_builddir]]]) -dnl -dnl Processes a file called Makefile.frag in the source directory -dnl of the most recently added extension. $(srcdir) and $(builddir) -dnl are substituted with the proper paths. Can be used to supply -dnl custom rules and/or additional targets. -dnl -AC_DEFUN([PHP_ADD_MAKEFILE_FRAGMENT],[ - ifelse($1,,src=$ext_srcdir/Makefile.frag,src=$1) - ifelse($2,,ac_srcdir=$ext_srcdir,ac_srcdir=$2) - ifelse($3,,ac_builddir=$ext_builddir,ac_builddir=$3) - sed -e "s#\$(srcdir)#$ac_srcdir#g" -e "s#\$(builddir)#$ac_builddir#g" $src >> Makefile.fragments -]) - -AC_DEFUN(PHP_PROG_RE2C,[ - AC_CHECK_PROG(RE2C, re2c, re2c, [exit 0;]) -]) - -dnl PHP_DEFINE(WHAT[, value]) -dnl -dnl Creates builddir/include/what.h and in there #define WHAT value -dnl -AC_DEFUN([PHP_DEFINE],[ - [echo "#define ]$1[]ifelse([$2],,[ 1],[ $2])[" > include/php_]translit($1,A-Z,a-z)[.h] -]) - -dnl PHP_INIT_BUILD_SYSTEM -dnl -AC_DEFUN([PHP_INIT_BUILD_SYSTEM],[ -test -d include || mkdir include -> Makefile.objects -> Makefile.fragments -dnl We need to play tricks here to avoid matching the egrep line itself -pattern=define -egrep $pattern'.*include/php' $srcdir/configure|sed 's/.*>//'|xargs touch 2>/dev/null -]) - -dnl PHP_GEN_GLOBAL_MAKEFILE -dnl -dnl Generates the global makefile. -dnl -AC_DEFUN([PHP_GEN_GLOBAL_MAKEFILE],[ - cat >Makefile <<EOF -srcdir = $abs_srcdir -builddir = $abs_builddir -top_srcdir = $abs_srcdir -top_builddir = $abs_builddir -EOF - for i in $PHP_VAR_SUBST; do - eval echo "$i = \$$i" >> Makefile - done - - cat $abs_srcdir/Makefile.global Makefile.fragments Makefile.objects >> Makefile -]) - -dnl PHP_ADD_SOURCES(source-path, sources[, special-flags[, type]]) -dnl -dnl Adds sources which are located relative to source-path to the -dnl array of type type. Sources are processed with optional -dnl special-flags which are passed to the compiler. Sources -dnl can be either written in C or C++ (filenames shall end in .c -dnl or .cpp, respectively). -dnl -dnl Note: If source-path begins with a "/", the "/" is removed and -dnl the path is interpreted relative to the top build-directory. -dnl -dnl which array to append to? -AC_DEFUN([PHP_ADD_SOURCES],[ - PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS))) -]) -dnl -dnl _PHP_ASSIGN_BUILD_VARS(type) -dnl internal, don't use -AC_DEFUN([_PHP_ASSIGN_BUILD_VARS],[ -ifelse($1,shared,[ - b_c_pre=$shared_c_pre - b_cxx_pre=$shared_cxx_pre - b_c_meta=$shared_c_meta - b_cxx_meta=$shared_cxx_meta - b_c_post=$shared_c_post - b_cxx_post=$shared_cxx_post -],[ - b_c_pre=$php_c_pre - b_cxx_pre=$php_cxx_pre - b_c_meta=$php_c_meta - b_cxx_meta=$php_cxx_meta - b_c_post=$php_c_post - b_cxx_post=$php_cxx_post -])dnl - b_lo=[$]$1_lo -]) - -dnl PHP_ADD_SOURCES_X(source-path, sources[, special-flags[, target-var[, shared[, special-post-flags]]]]) -dnl -dnl Additional to PHP_ADD_SOURCES (see above), this lets you set the -dnl name of the array target-var directly, as well as whether -dnl shared objects will be built from the sources. Should not be -dnl used directly. -dnl -AC_DEFUN([PHP_ADD_SOURCES_X],[ -dnl relative to source- or build-directory? -dnl ac_srcdir/ac_bdir include trailing slash - case $1 in - ""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir; ac_inc="-I. -I$abs_srcdir" ;; - /*[)] ac_srcdir=`echo "$1"|cut -c 2-`"/"; ac_bdir=$ac_srcdir; ac_inc="-I$ac_bdir -I$abs_srcdir/$ac_bdir" ;; - *[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$1/"; ac_inc="-I$ac_bdir -I$ac_srcdir" ;; - esac - -dnl how to build .. shared or static? - ifelse($5,yes,_PHP_ASSIGN_BUILD_VARS(shared),_PHP_ASSIGN_BUILD_VARS(php)) - -dnl iterate over the sources - old_IFS=[$]IFS - for ac_src in $2; do - -dnl remove the suffix - IFS=. - set $ac_src - ac_obj=[$]1 - IFS=$old_IFS - -dnl append to the array which has been dynamically chosen at m4 time - $4="[$]$4 [$]ac_bdir[$]ac_obj.lo" - -dnl choose the right compiler/flags/etc. for the source-file - case $ac_src in - *.c[)] ac_comp="$b_c_pre $3 $ac_inc $b_c_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_c_post" ;; - *.cpp[)] ac_comp="$b_cxx_pre $3 $ac_inc $b_cxx_meta -c $ac_srcdir$ac_src -o $ac_bdir$ac_obj.$b_lo $6$b_cxx_post" ;; - esac - -dnl create a rule for the object/source combo - cat >>Makefile.objects<<EOF -$ac_bdir[$]ac_obj.lo: $ac_srcdir[$]ac_src - $ac_comp -EOF - done -]) - -dnl -dnl Disable building CLI -dnl -AC_DEFUN([PHP_DISABLE_CLI],[ - disable_cli=1 -]) - -dnl -dnl Separator into the configure --help display. -dnl -AC_DEFUN([PHP_HELP_SEPARATOR],[ -AC_ARG_ENABLE([],[ -$1 -],[]) -]) - -dnl -dnl PHP_TARGET_RDYNAMIC -dnl -dnl Checks whether -rdynamic is supported by the compiler. This -dnl is necessary for some targets to populate the global symbol -dnl table. Otherwise, dynamic modules would not be able to resolve -dnl PHP-related symbols. -dnl -dnl If successful, adds -rdynamic to PHP_LDFLAGS. -dnl -AC_DEFUN([PHP_TARGET_RDYNAMIC],[ - if test -n "$GCC"; then - dnl we should use a PHP-specific macro here - TSRM_CHECK_GCC_ARG(-rdynamic, gcc_rdynamic=yes) - if test "$gcc_rdynamic" = "yes"; then - PHP_LDFLAGS="$PHP_LDFLAGS -rdynamic" - fi - fi -]) - -AC_DEFUN([PHP_REMOVE_USR_LIB],[ - unset ac_new_flags - for i in [$]$1; do - case [$]i in - -L/usr/lib|-L/usr/lib/[)] ;; - *[)] ac_new_flags="[$]ac_new_flags [$]i" ;; - esac - done - $1=[$]ac_new_flags -]) - -dnl PHP_EVAL_LIBLINE(LINE, SHARED-LIBADD) -dnl -dnl Use this macro, if you need to add libraries and or library search -dnl paths to the PHP build system which are only given in compiler -dnl notation. -dnl -AC_DEFUN([PHP_EVAL_LIBLINE],[ - for ac_i in $1; do - case $ac_i in - -l*[)] - ac_ii=`echo $ac_i|cut -c 3-` - PHP_ADD_LIBRARY($ac_ii,1,$2) - ;; - -L*[)] - ac_ii=`echo $ac_i|cut -c 3-` - PHP_ADD_LIBPATH($ac_ii,$2) - ;; - esac - done -]) - -dnl PHP_EVAL_INCLINE(LINE) -dnl -dnl Use this macro, if you need to add header search paths to the PHP -dnl build system which are only given in compiler notation. -dnl -AC_DEFUN([PHP_EVAL_INCLINE],[ - for ac_i in $1; do - case $ac_i in - -I*[)] - ac_ii=`echo $ac_i|cut -c 3-` - PHP_ADD_INCLUDE($ac_ii) - ;; - esac - done -]) - -AC_DEFUN([PHP_READDIR_R_TYPE],[ - dnl HAVE_READDIR_R is also defined by libmysql - AC_CHECK_FUNC(readdir_r,ac_cv_func_readdir_r=yes,ac_cv_func_readdir=no) - if test "$ac_cv_func_readdir_r" = "yes"; then - AC_CACHE_CHECK(for type of readdir_r, ac_cv_what_readdir_r,[ - AC_TRY_RUN([ -#define _REENTRANT -#include <sys/types.h> -#include <dirent.h> - -#ifndef PATH_MAX -#define PATH_MAX 1024 -#endif - -main() { - DIR *dir; - char entry[sizeof(struct dirent)+PATH_MAX]; - struct dirent *pentry = (struct dirent *) &entry; - - dir = opendir("/"); - if (!dir) - exit(1); - if (readdir_r(dir, (struct dirent *) entry, &pentry) == 0) - exit(0); - exit(1); -} - ],[ - ac_cv_what_readdir_r=POSIX - ],[ - AC_TRY_CPP([ -#define _REENTRANT -#include <sys/types.h> -#include <dirent.h> -int readdir_r(DIR *, struct dirent *); - ],[ - ac_cv_what_readdir_r=old-style - ],[ - ac_cv_what_readdir_r=none - ]) - ],[ - ac_cv_what_readdir_r=none - ]) - ]) - case $ac_cv_what_readdir_r in - POSIX) - AC_DEFINE(HAVE_POSIX_READDIR_R,1,[whether you have POSIX readdir_r]);; - old-style) - AC_DEFINE(HAVE_OLD_READDIR_R,1,[whether you have old-style readdir_r]);; - esac - fi -]) - -AC_DEFUN([PHP_SHLIB_SUFFIX_NAME],[ - PHP_SUBST(SHLIB_SUFFIX_NAME) - SHLIB_SUFFIX_NAME=so - case $host_alias in - *hpux*[)] - SHLIB_SUFFIX_NAME=sl - ;; - *darwin*[)] - SHLIB_SUFFIX_NAME=dylib - ;; - esac -]) - -AC_DEFUN([PHP_DEBUG_MACRO],[ - DEBUG_LOG=$1 - cat >$1 <<X -CONFIGURE: $CONFIGURE_COMMAND -CC: $CC -CFLAGS: $CFLAGS -CPPFLAGS: $CPPFLAGS -CXX: $CXX -CXXFLAGS: $CXXFLAGS -INCLUDES: $INCLUDES -LDFLAGS: $LDFLAGS -LIBS: $LIBS -DLIBS: $DLIBS -SAPI: $PHP_SAPI -PHP_RPATHS: $PHP_RPATHS -uname -a: `uname -a` - -X - cat >conftest.$ac_ext <<X -main() -{ - exit(0); -} -X - (eval echo \"$ac_link\"; eval $ac_link && ./conftest) >>$1 2>&1 - rm -fr conftest* -]) - -AC_DEFUN([PHP_DOES_PWRITE_WORK],[ - AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <errno.h> -$1 - main() { - int fd = open("conftest_in", O_WRONLY|O_CREAT, 0600); - - if (fd < 0) exit(1); - if (pwrite(fd, "text", 4, 0) != 4) exit(1); - /* Linux glibc breakage until 2.2.5 */ - if (pwrite(fd, "text", 4, -1) != -1 || errno != EINVAL) exit(1); - exit(0); - } - - ],[ - ac_cv_pwrite=yes - ],[ - ac_cv_pwrite=no - ],[ - ac_cv_pwrite=no - ]) -]) - -AC_DEFUN([PHP_DOES_PREAD_WORK],[ - echo test > conftest_in - AC_TRY_RUN([ -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -#include <unistd.h> -#include <errno.h> -$1 - main() { - char buf[3]; - int fd = open("conftest_in", O_RDONLY); - if (fd < 0) exit(1); - if (pread(fd, buf, 2, 0) != 2) exit(1); - /* Linux glibc breakage until 2.2.5 */ - if (pread(fd, buf, 2, -1) != -1 || errno != EINVAL) exit(1); - exit(0); - } - ],[ - ac_cv_pread=yes - ],[ - ac_cv_pread=no - ],[ - ac_cv_pread=no - ]) - rm -f conftest_in -]) - -AC_DEFUN([PHP_PWRITE_TEST],[ - AC_CACHE_CHECK(whether pwrite works,ac_cv_pwrite,[ - PHP_DOES_PWRITE_WORK - if test "$ac_cv_pwrite" = "no"; then - PHP_DOES_PWRITE_WORK([ssize_t pwrite(int, void *, size_t, off64_t);]) - if test "$ac_cv_pwrite" = "yes"; then - ac_cv_pwrite=64 - fi - fi - ]) - - if test "$ac_cv_pwrite" != "no"; then - AC_DEFINE(HAVE_PWRITE, 1, [ ]) - if test "$ac_cv_pwrite" = "64"; then - AC_DEFINE(PHP_PWRITE_64, 1, [whether pwrite64 is default]) - fi - fi -]) - -AC_DEFUN([PHP_PREAD_TEST],[ - AC_CACHE_CHECK(whether pread works,ac_cv_pread,[ - PHP_DOES_PREAD_WORK - if test "$ac_cv_pread" = "no"; then - PHP_DOES_PREAD_WORK([ssize_t pread(int, void *, size_t, off64_t);]) - if test "$ac_cv_pread" = "yes"; then - ac_cv_pread=64 - fi - fi - ]) - - if test "$ac_cv_pread" != "no"; then - AC_DEFINE(HAVE_PREAD, 1, [ ]) - if test "$ac_cv_pread" = "64"; then - AC_DEFINE(PHP_PREAD_64, 1, [whether pread64 is default]) - fi - fi -]) - -AC_DEFUN([PHP_MISSING_TIME_R_DECL],[ - AC_MSG_CHECKING([for missing declarations of reentrant functions]) - AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = localtime_r],[ - : - ],[ - AC_DEFINE(MISSING_LOCALTIME_R_DECL,1,[Whether localtime_r is declared]) - ]) - AC_TRY_COMPILE([#include <time.h>],[struct tm *(*func)() = gmtime_r],[ - : - ],[ - AC_DEFINE(MISSING_GMTIME_R_DECL,1,[Whether gmtime_r is declared]) - ]) - AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = asctime_r],[ - : - ],[ - AC_DEFINE(MISSING_ASCTIME_R_DECL,1,[Whether asctime_r is declared]) - ]) - AC_TRY_COMPILE([#include <time.h>],[char *(*func)() = ctime_r],[ - : - ],[ - AC_DEFINE(MISSING_CTIME_R_DECL,1,[Whether ctime_r is declared]) - ]) - AC_TRY_COMPILE([#include <string.h>],[char *(*func)() = strtok_r],[ - : - ],[ - AC_DEFINE(MISSING_STRTOK_R_DECL,1,[Whether strtok_r is declared]) - ]) - AC_MSG_RESULT([done]) -]) - -dnl -dnl PHP_LIBGCC_LIBPATH(gcc) -dnl Stores the location of libgcc in libgcc_libpath -dnl -AC_DEFUN([PHP_LIBGCC_LIBPATH],[ - changequote({,}) - libgcc_libpath=`$1 --print-libgcc-file-name|sed 's%/*[^/][^/]*$%%'` - changequote([,]) -]) - -AC_DEFUN([PHP_ARG_ANALYZE_EX],[ -ext_output="yes, shared" -ext_shared=yes -case [$]$1 in -shared,*[)] - $1=`echo "[$]$1"|sed 's/^shared,//'` - ;; -shared[)] - $1=yes - ;; -no[)] - ext_output=no - ext_shared=no - ;; -*[)] - ext_output=yes - ext_shared=no - ;; -esac - -PHP_ALWAYS_SHARED([$1]) -]) - -AC_DEFUN([PHP_ARG_ANALYZE],[ -ifelse([$3],yes,[PHP_ARG_ANALYZE_EX([$1])],[ext_output=ifelse([$]$1,,no,[$]$1)]) -ifelse([$2],,,[AC_MSG_RESULT([$ext_output])]) -]) - -dnl -dnl PHP_ARG_WITH(arg-name, check message, help text[, default-val[, extension-or-not]]) -dnl Sets PHP_ARG_NAME either to the user value or to the default value. -dnl default-val defaults to no. This will also set the variable ext_shared, -dnl and will overwrite any previous variable of that name. -dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run -dnl the PHP_ARG_ANALYZE_EX. -dnl -AC_DEFUN([PHP_ARG_WITH],[ -PHP_REAL_ARG_WITH([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_),[ifelse($5,,yes,$5)]) -]) - -AC_DEFUN([PHP_REAL_ARG_WITH],[ -ifelse([$2],,,[AC_MSG_CHECKING([$2])]) -AC_ARG_WITH($1,[$3],$5=[$]withval, -[ - $5=ifelse($4,,no,$4) - - if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then - $5=$PHP_ENABLE_ALL - fi -]) -PHP_ARG_ANALYZE($5,[$2],$6) -]) - -dnl -dnl PHP_ARG_ENABLE(arg-name, check message, help text[, default-val[, extension-or-not]]) -dnl Sets PHP_ARG_NAME either to the user value or to the default value. -dnl default-val defaults to no. This will also set the variable ext_shared, -dnl and will overwrite any previous variable of that name. -dnl If extension-or-not is yes (default), then do the ENABLE_ALL check and run -dnl the PHP_ARG_ANALYZE_EX. -dnl -AC_DEFUN([PHP_ARG_ENABLE],[ -PHP_REAL_ARG_ENABLE([$1],[$2],[$3],[$4],PHP_[]translit($1,a-z-,A-Z_),[ifelse($5,,yes,$5)]) -]) - -AC_DEFUN([PHP_REAL_ARG_ENABLE],[ -ifelse([$2],,,[AC_MSG_CHECKING([$2])]) -AC_ARG_ENABLE($1,[$3],$5=[$]enableval, -[ - $5=ifelse($4,,no,$4) - - if test "$PHP_ENABLE_ALL" && test "$6" = "yes"; then - $5=$PHP_ENABLE_ALL - fi -]) -PHP_ARG_ANALYZE($5,[$2],$6) -]) - -AC_DEFUN([PHP_MODULE_PTR],[ - EXTRA_MODULE_PTRS="$EXTRA_MODULE_PTRS $1," -]) - -AC_DEFUN([PHP_CONFIG_NICE],[ - test -f $1 && mv $1 $1.old - rm -f $1.old - cat >$1<<EOF -#! /bin/sh -# -# Created by configure - -EOF - - for var in CFLAGS CXXFLAGS CPPFLAGS LDFLAGS LIBS CC CXX; do - eval val=\$$var - if test -n "$val"; then - echo "$var='$val' \\" >> $1 - fi - done - - for arg in [$]0 "[$]@"; do - echo "'[$]arg' \\" >> $1 - done - echo '"[$]@"' >> $1 - chmod +x $1 -]) - -AC_DEFUN([PHP_TIME_R_TYPE],[ -AC_CACHE_CHECK(for type of reentrant time-related functions, ac_cv_time_r_type,[ -AC_TRY_RUN([ -#include <time.h> - -main() { -char buf[27]; -struct tm t; -time_t old = 0; -int r, s; - -s = gmtime_r(&old, &t); -r = (int) asctime_r(&t, buf, 26); -if (r == s && s == 0) return (0); -return (1); -} -],[ - ac_cv_time_r_type=hpux -],[ - AC_TRY_RUN([ -#include <time.h> -main() { - struct tm t, *s; - time_t old = 0; - char buf[27], *p; - - s = gmtime_r(&old, &t); - p = asctime_r(&t, buf, 26); - if (p == buf && s == &t) return (0); - return (1); -} - ],[ - ac_cv_time_r_type=irix - ],[ - ac_cv_time_r_type=POSIX - ]) -],[ - ac_cv_time_r_type=POSIX -]) -]) - case $ac_cv_time_r_type in - hpux[)] AC_DEFINE(PHP_HPUX_TIME_R,1,[Whether you have HP-UX 10.x]) ;; - irix[)] AC_DEFINE(PHP_IRIX_TIME_R,1,[Whether you have IRIX-style functions]) ;; - esac -]) - -AC_DEFUN([PHP_SUBST],[ - PHP_VAR_SUBST="$PHP_VAR_SUBST $1" -]) - -AC_DEFUN([PHP_SUBST_OLD],[ - PHP_SUBST($1) - AC_SUBST($1) -]) - -AC_DEFUN([PHP_TM_GMTOFF],[ -AC_CACHE_CHECK([for tm_gmtoff in struct tm], ac_cv_struct_tm_gmtoff, -[AC_TRY_COMPILE([#include <sys/types.h> -#include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_gmtoff;], - ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)]) - -if test "$ac_cv_struct_tm_gmtoff" = yes; then - AC_DEFINE(HAVE_TM_GMTOFF,1,[whether you have tm_gmtoff in struct tm]) -fi -]) - -dnl PHP_CONFIGURE_PART(MESSAGE) -dnl Idea borrowed from mm -AC_DEFUN([PHP_CONFIGURE_PART],[ - AC_MSG_RESULT() - AC_MSG_RESULT([${T_MD}$1${T_ME}]) -]) - -AC_DEFUN([PHP_PROG_SENDMAIL],[ -PHP_ALT_PATH=/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib -AC_PATH_PROG(PROG_SENDMAIL, sendmail,[], $PATH:$PHP_ALT_PATH) -if test -n "$PROG_SENDMAIL"; then - AC_DEFINE(HAVE_SENDMAIL,1,[whether you have sendmail]) -fi -]) - -AC_DEFUN([PHP_RUNPATH_SWITCH],[ -dnl check for -R, etc. switch -AC_MSG_CHECKING([if compiler supports -R]) -AC_CACHE_VAL(php_cv_cc_dashr,[ - SAVE_LIBS=$LIBS - LIBS="-R /usr/lib $LIBS" - AC_TRY_LINK([], [], php_cv_cc_dashr=yes, php_cv_cc_dashr=no) - LIBS=$SAVE_LIBS]) -AC_MSG_RESULT([$php_cv_cc_dashr]) -if test $php_cv_cc_dashr = "yes"; then - ld_runpath_switch=-R -else - AC_MSG_CHECKING([if compiler supports -Wl,-rpath,]) - AC_CACHE_VAL(php_cv_cc_rpath,[ - SAVE_LIBS=$LIBS - LIBS="-Wl,-rpath,/usr/lib $LIBS" - AC_TRY_LINK([], [], php_cv_cc_rpath=yes, php_cv_cc_rpath=no) - LIBS=$SAVE_LIBS]) - AC_MSG_RESULT([$php_cv_cc_rpath]) - if test $php_cv_cc_rpath = "yes"; then - ld_runpath_switch=-Wl,-rpath, - else - dnl something innocuous - ld_runpath_switch=-L - fi -fi -]) - -AC_DEFUN([PHP_STRUCT_FLOCK],[ -AC_CACHE_CHECK(for struct flock,ac_cv_struct_flock, - AC_TRY_COMPILE([ -#include <unistd.h> -#include <fcntl.h> - ], - [struct flock x;], - [ - ac_cv_struct_flock=yes |
