diff options
author | Sascha Schumann <sas@php.net> | 2000-05-06 23:26:41 +0000 |
---|---|---|
committer | Sascha Schumann <sas@php.net> | 2000-05-06 23:26:41 +0000 |
commit | ec9612aa44f10fd04e74c760e7104e9621c46a9c (patch) | |
tree | c59712ffb5302a17950d9e48efa5f455dd19908f /configure.in | |
parent | 54fa1a77d7c68d196eb3fc83dec33bbf583b19d2 (diff) | |
download | php-git-ec9612aa44f10fd04e74c760e7104e9621c46a9c.tar.gz |
This change addresses an issue on systems which cannot link against libnsl
and libsocket, resulting in segfaults. If yp_get_default_domain is
available after checking for libsocket, we assume we do not need libnsl
anymore.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/configure.in b/configure.in index e01b71ef8e..031af16da7 100644 --- a/configure.in +++ b/configure.in @@ -184,9 +184,6 @@ fi INCLUDES="$INCLUDES -I\$(top_builddir)/Zend -I\$(top_srcdir)" -AC_CHECK_LIB(nsl, gethostname, [ - AC_ADD_LIBRARY(nsl) - AC_DEFINE(HAVE_LIBNSL) ], []) AC_CHECK_LIB(socket, socket, [ AC_ADD_LIBRARY(socket) @@ -195,9 +192,26 @@ AC_CHECK_LIB(socket, socket, [ AC_ADD_LIBRARY(socket) ])]) -AC_CHECK_LIB(nsl, gethostbyaddr, [ +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 + +unset ac_cv_func_yp_get_default_domain +AC_CHECK_FUNC(yp_get_default_domain, + [php_no_nsl_checks=yes],[ ]) +unset ac_cv_func_yp_get_default_domain + +if test "$php_no_nsl_checks" != "yes"; then + +AC_CHECK_LIB(nsl, gethostname, [ AC_ADD_LIBRARY(nsl) - AC_DEFINE(HAVE_LIBNSL) ], []) + AC_DEFINE(HAVE_LIBNSL) ],[ + AC_CHECK_LIB(nsl, gethostbyaddr, [ + AC_ADD_LIBRARY(nsl) + AC_DEFINE(HAVE_LIBNSL) ], []) +]) + +fi AC_CHECK_LIB(crypt, crypt, [ AC_ADD_LIBRARY(crypt) |