cvs: /php4 configure.in

From: Date: Sat, 06 May 2000 23:26:41 +0000
Subject: cvs: /php4 configure.in
Groups: php.version4 
Request: Send a blank email to php-version4+get-14623@lists.php.net to get a copy of this message
sas Sat May 6 16:26:41 2000 EDT Modified files: /php4 configure.in Log: 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. Index: php4/configure.in diff -u php4/configure.in:1.122 php4/configure.in:1.123 --- php4/configure.in:1.122 Fri May 5 18:48:35 2000 +++ php4/configure.in Sat May 6 16:26:41 2000 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.122 2000/05/06 01:48:35 sas Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.123 2000/05/06 23:26:41 sas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -184,9 +184,6 @@ 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) @@ -194,10 +191,27 @@ AC_CHECK_LIB(socket, htonl, [ AC_ADD_LIBRARY(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 + +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, gethostbyaddr, [ +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)

« previous php.version4 (#14623) next »