Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Feb 2007 12:48:04 -0700
From:      John E Hein <jhein@timing.com>
To:        Garrett Cooper <youshi10@u.washington.edu>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: Finding libraries to link with and autoconf resources?
Message-ID:  <17871.29428.183244.232189@gromit.timing.com>
In-Reply-To: <2D763A31-2BAF-4AD5-A256-273CD37EB7A5@u.washington.edu>
References:  <45CE8BEC.7050404@u.washington.edu> <17870.42419.779434.735451@bhuda.mired.org> <2D763A31-2BAF-4AD5-A256-273CD37EB7A5@u.washington.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
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

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}

(see also bsd.port.mk and the Porter's Handbook)

ports@ is a better place to ask such questions, by the way.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?17871.29428.183244.232189>