summaryrefslogtreecommitdiff
path: root/ext/yp
diff options
context:
space:
mode:
authorHartmut Holzgraefe <hholzgra@php.net>2002-10-23 16:04:03 +0000
committerHartmut Holzgraefe <hholzgra@php.net>2002-10-23 16:04:03 +0000
commita681203a83970dbdce24a4968b61ff5584e579f1 (patch)
tree49288aaf36d260ab6931a06559872701018a4a9e /ext/yp
parent9da3c884fb0e955f4ef7d89cb113372791e3371a (diff)
downloadphp-git-a681203a83970dbdce24a4968b61ff5584e579f1.tar.gz
don't assume yp-functions are always in libc, try also libnsl
Diffstat (limited to 'ext/yp')
-rw-r--r--ext/yp/config.m423
1 files changed, 23 insertions, 0 deletions
diff --git a/ext/yp/config.m4 b/ext/yp/config.m4
index f5f912bc58..3bdc76552b 100644
--- a/ext/yp/config.m4
+++ b/ext/yp/config.m4
@@ -6,8 +6,31 @@ PHP_ARG_ENABLE(yp,whether to include YP support,
[ --enable-yp Include YP support.])
if test "$PHP_YP" != "no"; then
+
+ AC_CHECK_LIB(nsl, yp_match, [
+ YP_LIBS=nsl
+ YP_CHECK_IN_LIB=nsl
+ ],
+ AC_CHECK_LIB(c, yp_match, [
+ YP_LIBS=
+ YP_CHECK_IN_LIB=c
+ ],[
+ AC_MSG_ERROR(Unable to find required yp/nis library)
+ ])
+ )
+
+
AC_DEFINE(HAVE_YP,1,[ ])
PHP_NEW_EXTENSION(yp, yp.c, $ext_shared)
+
+ PHP_SUBST(YP_SHARED_LIBADD)
+
+ if test -n "$YP_LIBS"; then
+ PHP_ADD_LIBRARY_WITH_PATH($YP_LIBS, $YP_LIBDIR, YP_SHARED_LIBADD)
+ fi
+
+
+
case $host_alias in
*solaris*)
AC_DEFINE(SOLARIS_YP,1,[ ]) ;;