version 1.1, 2012/02/21 23:47:51
|
version 1.1.1.2.2.1, 2013/07/22 01:44:13
|
Line 194 dnl the path is interpreted relative to the top build-
|
Line 194 dnl the path is interpreted relative to the top build-
|
dnl |
dnl |
dnl which array to append to? |
dnl which array to append to? |
AC_DEFUN([PHP_ADD_SOURCES],[ |
AC_DEFUN([PHP_ADD_SOURCES],[ |
PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,cli,PHP_CLI_OBJS,ifelse($4,sapi,PHP_SAPI_OBJS,ifelse($4,cgi,PHP_CGI_OBJS,ifelse($4,fpm,PHP_FPM_OBJS,PHP_GLOBAL_OBJS))))) | PHP_ADD_SOURCES_X($1, $2, $3, ifelse($4,sapi,PHP_SAPI_OBJS,PHP_GLOBAL_OBJS)) |
]) |
]) |
|
|
dnl |
dnl |
Line 762 AC_DEFUN([PHP_REQUIRE_CXX],[
|
Line 762 AC_DEFUN([PHP_REQUIRE_CXX],[
|
if test -z "$php_cxx_done"; then |
if test -z "$php_cxx_done"; then |
AC_PROG_CXX |
AC_PROG_CXX |
AC_PROG_CXXCPP |
AC_PROG_CXXCPP |
|
PHP_ADD_LIBRARY(stdc++) |
php_cxx_done=yes |
php_cxx_done=yes |
fi |
fi |
]) |
]) |
Line 772 dnl
|
Line 773 dnl
|
AC_DEFUN([PHP_BUILD_SHARED],[ |
AC_DEFUN([PHP_BUILD_SHARED],[ |
PHP_BUILD_PROGRAM |
PHP_BUILD_PROGRAM |
OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] |
OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] |
php_build_target=shared | php_sapi_module=shared |
|
|
php_c_pre=$shared_c_pre |
php_c_pre=$shared_c_pre |
php_c_meta=$shared_c_meta |
php_c_meta=$shared_c_meta |
Line 789 dnl
|
Line 790 dnl
|
AC_DEFUN([PHP_BUILD_STATIC],[ |
AC_DEFUN([PHP_BUILD_STATIC],[ |
PHP_BUILD_PROGRAM |
PHP_BUILD_PROGRAM |
OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] |
OVERALL_TARGET=libphp[]$PHP_MAJOR_VERSION[.la] |
php_build_target=static | php_sapi_module=static |
]) |
]) |
|
|
dnl |
dnl |
Line 798 dnl
|
Line 799 dnl
|
AC_DEFUN([PHP_BUILD_BUNDLE],[ |
AC_DEFUN([PHP_BUILD_BUNDLE],[ |
PHP_BUILD_PROGRAM |
PHP_BUILD_PROGRAM |
OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle] |
OVERALL_TARGET=libs/libphp[]$PHP_MAJOR_VERSION[.bundle] |
php_build_target=static | php_sapi_module=static |
]) |
]) |
|
|
dnl |
dnl |
dnl PHP_BUILD_PROGRAM |
dnl PHP_BUILD_PROGRAM |
dnl |
dnl |
AC_DEFUN([PHP_BUILD_PROGRAM],[ |
AC_DEFUN([PHP_BUILD_PROGRAM],[ |
OVERALL_TARGET=[]ifelse($1,,php,$1) |
|
php_c_pre='$(LIBTOOL) --mode=compile $(CC)' |
php_c_pre='$(LIBTOOL) --mode=compile $(CC)' |
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' |
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)' |
php_c_post= |
php_c_post= |
Line 826 AC_DEFUN([PHP_BUILD_PROGRAM],[
|
Line 826 AC_DEFUN([PHP_BUILD_PROGRAM],[
|
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting |
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting |
shared_cxx_post= |
shared_cxx_post= |
shared_lo=lo |
shared_lo=lo |
|
|
php_build_target=program |
|
]) |
]) |
|
|
dnl |
dnl |
Line 873 EOF
|
Line 871 EOF
|
dnl |
dnl |
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]]) |
dnl PHP_SELECT_SAPI(name, type[, sources [, extra-cflags [, build-target]]]) |
dnl |
dnl |
dnl Selects the SAPI name and type (static, shared, programm) | dnl Selects the SAPI name and type (static, shared, bundle, program) |
dnl and optionally also the source-files for the SAPI-specific |
dnl and optionally also the source-files for the SAPI-specific |
dnl objects. |
dnl objects. |
dnl |
dnl |
AC_DEFUN([PHP_SELECT_SAPI],[ |
AC_DEFUN([PHP_SELECT_SAPI],[ |
if test "$PHP_SAPI" != "default"; then | if test "$2" = "program"; then |
AC_MSG_ERROR([ | PHP_BINARIES="$PHP_BINARIES $1" |
| elif test "$PHP_SAPI" != "none"; then |
| AC_MSG_ERROR([ |
+--------------------------------------------------------------------+ |
+--------------------------------------------------------------------+ |
| *** ATTENTION *** | |
| *** ATTENTION *** | |
| | |
| | |
| You've configured multiple SAPIs to be build. You can build only | |
| You've configured multiple SAPIs to be build. You can build only | |
| one SAPI module and CLI binary at the same time. | | | one SAPI module plus CGI, CLI and FPM binaries at the same time. | |
+--------------------------------------------------------------------+ |
+--------------------------------------------------------------------+ |
]) |
]) |
fi | else |
| PHP_SAPI=$1 |
| fi |
|
|
PHP_SAPI=$1 | PHP_ADD_BUILD_DIR([sapi/$1]) |
| |
case "$2" in | PHP_INSTALLED_SAPIS="$PHP_INSTALLED_SAPIS $1" |
static[)] PHP_BUILD_STATIC;; | |
shared[)] PHP_BUILD_SHARED;; | ifelse($2,program,[ |
bundle[)] PHP_BUILD_BUNDLE;; | PHP_BUILD_PROGRAM |
program[)] PHP_BUILD_PROGRAM($5);; | install_binaries="install-binaries" |
esac | install_binary_targets="$install_binary_targets install-$1" |
| PHP_SUBST(PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS) |
ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])]) | ifelse($3,,,[PHP_ADD_SOURCES_X([sapi/$1],[$3],[$4],PHP_[]translit($1,a-z0-9-,A-Z0-9_)[]_OBJS)]) |
| ],[ |
| case "$2" in |
| static[)] PHP_BUILD_STATIC;; |
| shared[)] PHP_BUILD_SHARED;; |
| bundle[)] PHP_BUILD_BUNDLE;; |
| esac |
| install_sapi="install-sapi" |
| ifelse($3,,,[PHP_ADD_SOURCES([sapi/$1],[$3],[$4],[sapi])]) |
| ]) |
]) |
]) |
|
|
dnl deprecated |
dnl deprecated |
Line 973 dnl ---------------------------------------------- Sha
|
Line 984 dnl ---------------------------------------------- Sha
|
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then |
if test "$3" != "shared" && test "$3" != "yes" && test "$4" = "cli"; then |
dnl ---------------------------------------------- CLI static module |
dnl ---------------------------------------------- CLI static module |
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no |
[PHP_]translit($1,a-z_-,A-Z__)[_SHARED]=no |
|
case "$PHP_SAPI" in |
|
cgi|embed[)] |
|
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,) |
|
EXT_STATIC="$EXT_STATIC $1" |
|
;; |
|
*[)] |
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) |
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cli) |
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,cgi) | ;; |
PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,fpm) | esac |
EXT_CLI_STATIC="$EXT_CLI_STATIC $1" |
EXT_CLI_STATIC="$EXT_CLI_STATIC $1" |
fi |
fi |
PHP_ADD_BUILD_DIR($ext_builddir) |
PHP_ADD_BUILD_DIR($ext_builddir) |
Line 1025 You either need to build $1 shared or build $2 statica
|
Line 1042 You either need to build $1 shared or build $2 statica
|
build to be successful. |
build to be successful. |
]) |
]) |
fi |
fi |
|
if test "x$is_it_enabled" = "xno" && test "x$3" != "xtrue"; then |
|
AC_MSG_ERROR([ |
|
You've configured extension $1, which depends on extension $2, |
|
but you've either not enabled $2, or have disabled it. |
|
]) |
|
fi |
dnl Some systems require that we link $2 to $1 when building |
dnl Some systems require that we link $2 to $1 when building |
]) |
]) |
|
|
Line 2297 AC_DEFUN([PHP_SETUP_OPENSSL],[
|
Line 2320 AC_DEFUN([PHP_SETUP_OPENSSL],[
|
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no |
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no |
|
|
dnl Fallbacks for different configure options |
dnl Fallbacks for different configure options |
if test -n "$PHP_OPENSSL" && test "$PHP_OPENSSL" != "no"; then | if test "$PHP_OPENSSL" != "no"; then |
PHP_OPENSSL_DIR=$PHP_OPENSSL |
PHP_OPENSSL_DIR=$PHP_OPENSSL |
elif test -n "$PHP_IMAP_SSL" && test "$PHP_IMAP_SSL" != "no"; then | elif test "$PHP_IMAP_SSL" != "no"; then |
PHP_OPENSSL_DIR=$PHP_IMAP_SSL |
PHP_OPENSSL_DIR=$PHP_IMAP_SSL |
fi |
fi |
|
|
Line 2654 EOF
|
Line 2677 EOF
|
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0" |
CONFIGURE_COMMAND="$CONFIGURE_COMMAND [$]0" |
fi |
fi |
for arg in $ac_configure_args; do |
for arg in $ac_configure_args; do |
if test `expr -- $arg : "'.*"` = 0; then | if test `expr -- $arg : "'.*"` = 0; then |
if test `expr -- $arg : "--.*"` = 0; then | if test `expr -- $arg : "--.*"` = 0; then |
break; | break; |
fi | fi |
echo "'[$]arg' \\" >> $1 | echo "'[$]arg' \\" >> $1 |
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'" | CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS '[$]arg'" |
else | else |
if test `expr -- $arg : "'--.*"` = 0; then | if test `expr -- $arg : "'--.*"` = 0; then |
break; | break; |
fi | fi |
echo "[$]arg \\" >> $1 | echo "[$]arg \\" >> $1 |
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg" | CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS [$]arg" |
fi | fi |
done |
done |
echo '"[$]@"' >> $1 |
echo '"[$]@"' >> $1 |
chmod +x $1 |
chmod +x $1 |
Line 2734 dnl
|
Line 2757 dnl
|
dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]]) |
dnl PHP_CHECK_PDO_INCLUDES([found [, not-found]]) |
dnl |
dnl |
AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[ |
AC_DEFUN([PHP_CHECK_PDO_INCLUDES],[ |
AC_CACHE_CHECK([for PDO includes], pdo_inc_path, [ | AC_CACHE_CHECK([for PDO includes], pdo_cv_inc_path, [ |
AC_MSG_CHECKING([for PDO includes]) |
AC_MSG_CHECKING([for PDO includes]) |
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then |
if test -f $abs_srcdir/include/php/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$abs_srcdir/ext | pdo_cv_inc_path=$abs_srcdir/ext |
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then |
elif test -f $abs_srcdir/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$abs_srcdir/ext | pdo_cv_inc_path=$abs_srcdir/ext |
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then |
elif test -f $prefix/include/php/ext/pdo/php_pdo_driver.h; then |
pdo_inc_path=$prefix/include/php/ext | pdo_cv_inc_path=$prefix/include/php/ext |
fi |
fi |
]) |
]) |
if test -n "$pdo_inc_path"; then | if test -n "$pdo_cv_inc_path"; then |
ifelse([$1],[],:,[$1]) |
ifelse([$1],[],:,[$1]) |
else |
else |
ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2]) |
ifelse([$2],[],[AC_MSG_ERROR([Cannot find php_pdo_driver.h.])],[$2]) |
Line 2872 main()
|
Line 2895 main()
|
fi |
fi |
]) |
]) |
|
|
|
dnl |
|
dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module]) |
|
dnl |
|
AC_DEFUN([PHP_INIT_DTRACE],[ |
|
dnl Set paths properly when called from extension |
|
case "$4" in |
|
""[)] ac_srcdir="$abs_srcdir/"; unset ac_bdir;; |
|
/*[)] ac_srcdir=`echo "$4"|cut -c 2-`"/"; ac_bdir=$ac_srcdir;; |
|
*[)] ac_srcdir="$abs_srcdir/$1/"; ac_bdir="$4/";; |
|
esac |
|
|
|
dnl providerdesc |
|
ac_provsrc=$1 |
|
old_IFS=[$]IFS |
|
IFS=. |
|
set $ac_provsrc |
|
ac_provobj=[$]1 |
|
IFS=$old_IFS |
|
|
|
dnl header-file |
|
ac_hdrobj=$2 |
|
|
|
dnl Add providerdesc.o into global objects when needed |
|
case $host_alias in |
|
*freebsd*) |
|
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o" |
|
PHP_LDFLAGS="$PHP_LDFLAGS -lelf" |
|
;; |
|
*solaris*) |
|
PHP_GLOBAL_OBJS="[$]PHP_GLOBAL_OBJS [$]ac_bdir[$]ac_provsrc.o" |
|
;; |
|
esac |
|
|
|
dnl DTrace objects |
|
old_IFS=[$]IFS |
|
for ac_src in $3; do |
|
IFS=. |
|
set $ac_src |
|
ac_obj=[$]1 |
|
IFS=$old_IFS |
|
|
|
PHP_DTRACE_OBJS="[$]PHP_DTRACE_OBJS [$]ac_bdir[$]ac_obj.lo" |
|
done; |
|
|
|
case [$]php_sapi_module in |
|
shared[)] |
|
for ac_lo in $PHP_DTRACE_OBJS; do |
|
dtrace_objs="[$]dtrace_objs `echo $ac_lo | $SED -e 's,\.lo$,.o,' -e 's#\(.*\)\/#\1\/.libs\/#'`" |
|
done; |
|
;; |
|
*[)] |
|
dtrace_objs='$(PHP_DTRACE_OBJS:.lo=.o)' |
|
;; |
|
esac |
|
|
|
dnl Generate Makefile.objects entries |
|
cat>>Makefile.objects<<EOF |
|
|
|
$ac_bdir[$]ac_hdrobj: $abs_srcdir/$ac_provsrc |
|
dtrace -h -C -s $ac_srcdir[$]ac_provsrc -o \$[]@ && \$(SED) -ibak 's,PHP_,DTRACE_,g' \$[]@ |
|
|
|
\$(PHP_DTRACE_OBJS): $ac_bdir[$]ac_hdrobj |
|
|
|
$ac_bdir[$]ac_provsrc.o: \$(PHP_DTRACE_OBJS) |
|
dtrace -G -o \$[]@ -s $abs_srcdir/$ac_provsrc $dtrace_objs |
|
|
|
EOF |
|
]) |