Make PHP compile out-of-the-box with uClibc

This commit is contained in:
Sascha Schumann 2002-10-24 12:21:07 +00:00
parent 938ba73be7
commit 6bf422d62e
4 changed files with 20 additions and 2 deletions

View File

@ -1680,6 +1680,13 @@ AC_DEFUN([PHP_CHECK_FUNC_LIB],[
AC_CHECK_LIB($2, __$1, [found=yes], [found=no])
])
if test "$found" = "yes"; then
ac_libs=$LIBS
LIBS="$LIBS -l$2"
AC_TRY_RUN([main() { return (0); }],[found=yes],[found=no],[found=no])
LIBS=$ac_libs
fi
if test "$found" = "yes"; then
PHP_ADD_LIBRARY($2)
PHP_DEF_HAVE($1)

View File

@ -279,7 +279,7 @@ PHP_CHECK_FUNC(gethostname, nsl)
PHP_CHECK_FUNC(gethostbyaddr, nsl)
PHP_CHECK_FUNC(yp_get_default_domain, nsl)
AC_CHECK_LIB(dl, dlopen, [PHP_ADD_LIBRARY(dl)])
PHP_CHECK_FUNC(dlopen, dl)
AC_CHECK_LIB(m, sin)
dnl Check for resolver routines.
@ -802,6 +802,7 @@ dnl -------------------------------------------------------------------------
PHP_CONFIGURE_PART(Configuring Zend)
LIBZEND_BASIC_CHECKS
LIBZEND_DLSYM_CHECK
LIBZEND_OTHER_CHECKS
TSRM_LIB='TSRM/libtsrm.la'

View File

@ -189,7 +189,7 @@ dnl AC_CHECK_LIB(pam, pam_start, [
dnl EXTRA_LIBS="$EXTRA_LIBS -lpam"
dnl AC_DEFINE(HAVE_LIBPAM,1,[ ]) ], [])
AC_CHECK_FUNCS(getcwd getwd)
AC_CHECK_FUNCS(getcwd getwd asinh acosh atanh log1p hypot)
AC_CRYPT_CAP
AC_FLUSH_IO

View File

@ -321,6 +321,7 @@ PHP_FUNCTION(tanh)
PHP_FUNCTION(asinh)
{
#ifdef HAVE_ASINH
zval **num;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@ -329,6 +330,7 @@ PHP_FUNCTION(asinh)
convert_to_double_ex(num);
Z_DVAL_P(return_value) = asinh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
#endif
}
/* }}} */
@ -337,6 +339,7 @@ PHP_FUNCTION(asinh)
PHP_FUNCTION(acosh)
{
#ifdef HAVE_ACOSH
zval **num;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@ -345,6 +348,7 @@ PHP_FUNCTION(acosh)
convert_to_double_ex(num);
Z_DVAL_P(return_value) = acosh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
#endif
}
/* }}} */
@ -353,6 +357,7 @@ PHP_FUNCTION(acosh)
PHP_FUNCTION(atanh)
{
#ifdef HAVE_ATANH
zval **num;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@ -361,6 +366,7 @@ PHP_FUNCTION(atanh)
convert_to_double_ex(num);
Z_DVAL_P(return_value) = atanh(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
#endif
}
/* }}} */
@ -504,6 +510,7 @@ PHP_FUNCTION(expm1)
PHP_FUNCTION(log1p)
{
#ifdef HAVE_LOG1P
zval **num;
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &num) == FAILURE) {
@ -512,6 +519,7 @@ PHP_FUNCTION(log1p)
convert_to_double_ex(num);
Z_DVAL_P(return_value) = log1p(Z_DVAL_PP(num));
Z_TYPE_P(return_value) = IS_DOUBLE;
#endif
}
/* }}} */
@ -577,6 +585,7 @@ PHP_FUNCTION(sqrt)
PHP_FUNCTION(hypot)
{
#ifdef HAVE_HYPOT
zval **num1, **num2;
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &num1, &num2) == FAILURE) {
@ -586,6 +595,7 @@ PHP_FUNCTION(hypot)
convert_to_double_ex(num2);
Z_DVAL_P(return_value) = hypot(Z_DVAL_PP(num1), Z_DVAL_PP(num2));
Z_TYPE_P(return_value) = IS_DOUBLE;
#endif
}
/* }}} */