Finding libraries to link with and autoconf resources?
Garrett Cooper
youshi10 at u.washington.edu
Sun Feb 11 06:46:56 UTC 2007
On Feb 10, 2007, at 9:12 PM, Mike Meyer wrote:
> In <45CE8BEC.7050404 at u.washington.edu>, Garrett Cooper
> <youshi10 at u.washington.edu> typed:
>> Hello,
>> This is my first attempt at porting an application, so please
>> bear with me.
>> I'm trying to port tvtime from Linux to FreeBSD and it's failing
>> during
>> the configure stage (claims it can't find -lpng when running a link
>> test). I know I should probably use the Linux libpng library but I'm
>> trying to make the application as native as possible with FreeBSD.
>> Anyhow though, I was wondering what directories I should typically
>> search when using -L for searching for the png libraries, for
>> instance
>> (/usr/lib.. ?).
>
> libpng isn't part of the base system, it's in the ports tree in
> graphics/png. Assuming you've got that installed, then use
> $LOCALBASE/bin/libpng-config to get the appropriate options.
>
> If you're creating a port, add "png.5:${PORTSDIR}/graphics/png" to
> LIB_DEPENDS.
>
> <mike
Well, what I'm trying to do is first compile the program (if
possible), then determine what needs to be done to port tvtime to
FreeBSD natively, as best possible (tvtime uses Video4Linux for a lot
of its stuff).
I just like that program because of the clean interface and
simplicity of use.
Anyhow, I looked for png under /usr/local and I came up with the
following:
[gcooper at sprsd /usr/local/lib]$ ls *png*
libpng.a libpng.so libpng.so.5
However the original configure script fails trying to find the lib
under /usr/local/include (all that's there are .h files). That's why
I asked the two-fold question about finding libraries with autoconf
scripts and autoconf resources. I know I have to change the script
somehow or pass in the right arguments, so that's why I was asking.
Are there any global scripts or options to pass to autoconf that sets
the -L option for gcc properly?
-Garrett
More information about the freebsd-hackers
mailing list