From dev-return-10836-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Mon Jan 05 11:17:49 2004 Return-Path: Delivered-To: apmail-apr-dev-archive@www.apache.org Received: (qmail 2984 invoked from network); 5 Jan 2004 11:17:49 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 5 Jan 2004 11:17:49 -0000 Received: (qmail 39218 invoked by uid 500); 5 Jan 2004 11:17:23 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 38982 invoked by uid 500); 5 Jan 2004 11:17:21 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 38965 invoked from network); 5 Jan 2004 11:17:21 -0000 Date: Mon, 5 Jan 2004 11:17:33 +0000 From: Joe Orton To: Noah Misch Cc: dev@apr.apache.org Subject: Re: [PATCH] Don't include extra libs on IRIX Message-ID: <20040105111733.GA2660@manyfish.co.uk> Mail-Followup-To: Noah Misch , dev@apr.apache.org References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Sun, Jan 04, 2004 at 06:04:16PM -0800, Noah Misch wrote: > Hi all, > > While building CVS HEAD apr on IRIX 6.5, linker warnings accumulate in > config.log and appear following the final link command because libnsl and > libsocket include code duplicated in libc on that platform. I propose changing > the AC_CHECK_LIB checks on nsl and socket to AC_SEARCH_LIBS checks, so we only > use those libraries if we actually _need_ them for certain functions. > > You can find a brief discussion of this issue on the SGI "freeware" site: > http://freeware.sgi.com/howto.html#a0 > > With this patch, CVS HEAD continues to build fine for me on mips-sgi-irix6.5, > i386-unknown-freebsd4.5, and sparc-sun-solaris2.7. > > I see two scenarios that could make this change unwise/incomplete: > > 1) Some platform does not need libnsl for gethostbyname but does need it for > another function we use. In that case, we should test the other function in > place of or in addition to gethostbyname. Solaris does need libnsl for inet_ntop... this is quite risky. I think it's safer to also change the check for gethostbyname to use AC_SEARCH_LIBS. > 2) Some platform has a broken version of the socket functions weak-linked into > libc, but one must use -lsocket for the POSIX-compliant versions. Is anyone > aware of such a platform? I think the other way around is more likely, though. Agreed... thanks for the patch, I've added these in. joe