diff -urN php-4.2.1RC2.org/configure.in php-4.2.1RC2/configure.in --- php-4.2.1RC2.org/configure.in Sat May 11 20:49:22 2002 +++ php-4.2.1RC2/configure.in Sat May 11 21:05:41 2002 @@ -297,6 +297,7 @@ if test "$php_no_nsl_checks" != "yes"; then +AC_CHECK_FUNC(gethostname,[true], [ AC_CHECK_LIB(nsl, gethostname, [ PHP_ADD_LIBRARY(nsl) AC_DEFINE(HAVE_LIBNSL,1,[ ]) ],[ @@ -304,6 +305,7 @@ PHP_ADD_LIBRARY(nsl) AC_DEFINE(HAVE_LIBNSL,1,[ ]) ], []) ]) +]) fi diff -urN php-4.2.1RC2.org/ext/gmp/config.m4 php-4.2.1RC2/ext/gmp/config.m4 --- php-4.2.1RC2.org/ext/gmp/config.m4 Sat May 11 20:49:22 2002 +++ php-4.2.1RC2/ext/gmp/config.m4 Sat May 11 21:05:41 2002 @@ -21,5 +21,6 @@ PHP_EXTENSION(gmp, $ext_shared) AC_DEFINE(HAVE_GMP, 1, [ ]) - PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib) + PHP_ADD_LIBRARY_WITH_PATH(gmp, $GMP_DIR/lib, GMP_SHARED_LIBADD) fi +PHP_SUBST(GMP_SHARED_LIBADD) diff -urN php-4.2.1RC2.org/ext/xslt/config.m4 php-4.2.1RC2/ext/xslt/config.m4 --- php-4.2.1RC2.org/ext/xslt/config.m4 Sat May 11 20:49:24 2002 +++ php-4.2.1RC2/ext/xslt/config.m4 Sat May 11 21:09:39 2002 @@ -81,7 +82,7 @@ found_js=no AC_CHECK_LIB(js, JS_GetRuntime, found_js=yes) if test "$found_js" = "yes"; then - PHP_ADD_LIBRARY(js) + PHP_ADD_LIBRARY(js,, XSLT_SHARED_LIBADD) fi fi diff -urN php-4.2.1RC2.org/ext/yp/Makefile.in php-4.2.1RC2/ext/yp/Makefile.in --- php-4.2.1RC2.org/ext/yp/Makefile.in Sat May 11 20:49:24 2002 +++ php-4.2.1RC2/ext/yp/Makefile.in Sat May 11 21:05:41 2002 @@ -2,5 +2,6 @@ LTLIBRARY_NAME = libyp.la LTLIBRARY_SOURCES = yp.c LTLIBRARY_SHARED_NAME = yp.la +LTLIBRARY_SHARED_LIBADD = $(NSL_SHARED_LIBADD) include $(top_srcdir)/build/dynlib.mk diff -urN php-4.2.1RC2.org/ext/yp/config.m4 php-4.2.1RC2/ext/yp/config.m4 --- php-4.2.1RC2.org/ext/yp/config.m4 Sat May 11 20:49:24 2002 +++ php-4.2.1RC2/ext/yp/config.m4 Sat May 11 21:05:41 2002 @@ -6,8 +6,11 @@ [ --enable-yp Include YP support.]) if test "$PHP_YP" != "no"; then - AC_DEFINE(HAVE_YP,1,[ ]) + PHP_SUBST(NSL_SHARED_LIBADD) + AC_ADD_LIBRARY_WITH_PATH(nsl, /usr/lib, NSL_SHARED_LIBADD) + AC_CHECK_LIB(nsl, yp_match, [AC_DEFINE(HAVE_YP,1,[ ])], [AC_MSG_ERROR(YP module requires libnsl)],) PHP_EXTENSION(yp, $ext_shared) + case $host_alias in *solaris*) AC_DEFINE(SOLARIS_YP,1,[ ]) ;;