summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--acinclude.m420
-rw-r--r--sapi/apache/config.m411
-rw-r--r--sapi/thttpd/config.m41
3 files changed, 22 insertions, 10 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index a5906108af..d56f3f10d3 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -4,6 +4,26 @@ dnl This file contains local autoconf functions.
sinclude(dynlib.m4)
+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
diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4
index 69e9580634..3cdb95566b 100644
--- a/sapi/apache/config.m4
+++ b/sapi/apache/config.m4
@@ -1,14 +1,5 @@
dnl ## -*- sh -*-
-AC_DEFUN(PHP_APACHE_CHECK_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_MSG_CHECKING(for Apache module support via DSO through APXS)
AC_ARG_WITH(apxs,
@@ -231,7 +222,7 @@ AC_ARG_WITH(mod_charset,
])
if test -n "$APACHE_MODULE"; then
- PHP_APACHE_CHECK_RDYNAMIC
+ PHP_TARGET_RDYNAMIC
$php_shtool mkdir -p sapi/apache
PHP_OUTPUT(sapi/apache/libphp4.module)
PHP_BUILD_STATIC
diff --git a/sapi/thttpd/config.m4 b/sapi/thttpd/config.m4
index afe49a2c09..81469e825c 100644
--- a/sapi/thttpd/config.m4
+++ b/sapi/thttpd/config.m4
@@ -2,6 +2,7 @@ AC_ARG_WITH(thttpd,
[ --with-thttpd=SRCDIR Build PHP as thttpd module],[
test -d $withval || AC_MSG_RESULT(thttpd directory does not exist ($withval))
PHP_EXPAND_PATH($withval, THTTPD)
+ PHP_TARGET_RDYNAMIC
INSTALL_IT="\
echo 'PHP_LIBS = -L. -lphp4 \$(PHP_LIBS) \$(EXTRA_LIBS)' > $THTTPD/php_makefile; \
echo 'PHP_LDFLAGS = \$(NATIVE_RPATHS) \$(PHP_LDFLAGS)' >> $THTTPD/php_makefile; \