mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Move PHP_TARGET_RDYNAMIC check to global acinclude.m4 and use it
in thttpd's config.m4.
This commit is contained in:
parent
35f8d4cb44
commit
e843e8c5f0
20
acinclude.m4
20
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
|
||||
|
@ -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
|
||||
|
@ -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; \
|
||||
|
Loading…
Reference in New Issue
Block a user