From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 11 21:08:46 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2D3AB16A408 for ; Sun, 11 Feb 2007 21:08:46 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: from mired.org (vpn.mired.org [66.92.153.74]) by mx1.freebsd.org (Postfix) with SMTP id C66BB13C4B5 for ; Sun, 11 Feb 2007 21:08:45 +0000 (UTC) (envelope-from mwm-keyword-freebsdhackers2.e313df@mired.org) Received: (qmail 42020 invoked by uid 1001); 11 Feb 2007 21:09:44 -0000 Received: by bhuda.mired.org (tmda-sendmail, from uid 1001); Sun, 11 Feb 2007 16:09:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17871.34327.776800.460172@bhuda.mired.org> Date: Sun, 11 Feb 2007 16:09:43 -0500 To: John E Hein In-Reply-To: <17871.29428.183244.232189@gromit.timing.com> References: <45CE8BEC.7050404@u.washington.edu> <17870.42419.779434.735451@bhuda.mired.org> <2D763A31-2BAF-4AD5-A256-273CD37EB7A5@u.washington.edu> <17871.29428.183244.232189@gromit.timing.com> X-Mailer: VM 7.17 under 21.4 (patch 20) "Double Solitaire" XEmacs Lucid X-Primary-Address: mwm@mired.org X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`; h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ X-Delivery-Agent: TMDA/1.1.5 (Fettercairn) From: Mike Meyer Cc: freebsd-hackers@freebsd.org, Garrett Cooper Subject: Re: Finding libraries to link with and autoconf resources? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2007 21:08:46 -0000 In <17871.29428.183244.232189@gromit.timing.com>, John E Hein typed: > Garrett Cooper wrote at 22:46 -0800 on Feb 10, 2007: > > Are there any global scripts or options to pass to autoconf that sets > > the -L option for gcc properly? > > If the configure script doesn't support --with-png=/your/path/to/png, > then you can force feed it by using env vars. As in: > > env LDFLAGS=-L/your/path/to/png/lib CPPFLAGS=-I/your/path/to/png/include configure You also need this if the port splits the directories in a way that libpng doesn't expect. Since it uses $(LOCALBASE)/lib and $(LOCALBASE)/include/libpng, it may be doing that. > In your freebsd port, there is a common idiom that looks like this > in the Makefile: > > LDFLAGS+=-L/your/path/to/png/lib > CPPFLAGS+=-I/your/path/to/png/include > CONFIGURE_ENV=CPPFLAGS="${CPPFLAGS} LDFLAGS="${LDFLAGS} The port idiom is correctly more like: LDFLAGS+=-L$(LOCALBASE)/subdir/to/png/lib CPPFLAGS+=-I$(LOCALBASE)/subdir/to/png/include to get LOCALBASE correct. > ports@ is a better place to ask such questions, by the way. Unless it's really an autoconf question, in which case the right place would be an autoconf list. http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.