]> granicus.if.org Git - php/commitdiff
Support systems without NIS functions, but with non-working libnsl
authorSascha Schumann <sas@php.net>
Thu, 21 Mar 2002 17:05:47 +0000 (17:05 +0000)
committerSascha Schumann <sas@php.net>
Thu, 21 Mar 2002 17:05:47 +0000 (17:05 +0000)
configure.in

index 2dcaece071838d181b42e6a9e0dc0e5033f35ee9..23b45b99cec230ffdc28d622d1ebb004b15b941a 100644 (file)
@@ -293,10 +293,18 @@ AC_CHECK_LIB(socket, socket, [
 dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try
 dnl to avoid -lnsl checks, if we already have the functions which
 dnl are usually in libnsl
+dnl Also, uClibc will bark at linking with glibc's libnsl.
 
+unset ac_cv_func_gethostname
 unset ac_cv_func_yp_get_default_domain
-AC_CHECK_FUNC(yp_get_default_domain,
- [php_no_nsl_checks=yes],[])
+AC_CHECK_FUNC(gethostname, [
+  php_no_nsl_checks=yes
+],[
+  AC_CHECK_FUNC(yp_get_default_domain, [
+    php_no_nsl_checks=yes
+  ])
+])
+unset ac_cv_func_gethostname
 unset ac_cv_func_yp_get_default_domain
 
 if test "$php_no_nsl_checks" != "yes"; then