Date: Sat, 13 Jul 2002 17:12:47 +0200 From: Roman Neuhauser <neuhauser@bellavista.cz> To: Paul Everlund <tdv94ped@cs.umu.se> Cc: freebsd-questions@freebsd.org Subject: Re: Include files in /usr/local/include not found Message-ID: <20020713151247.GI322@freepuppy.bellavista.cz> In-Reply-To: <3D303DC6.CD4A5CFB@cs.umu.se> References: <3D3013EA.C0904498@cs.umu.se> <20020713140607.GH322@freepuppy.bellavista.cz> <3D303DC6.CD4A5CFB@cs.umu.se>
next in thread | previous in thread | raw e-mail | index | archive | help
> Date: Sat, 13 Jul 2002 16:48:38 +0200 > From: Paul Everlund <tdv94ped@cs.umu.se> > To: Roman Neuhauser <neuhauser@bellavista.cz> > Cc: freebsd-questions@freebsd.org > Subject: Re: Include files in /usr/local/include not found > > Roman Neuhauser wrote: > > > From: Paul Everlund <tdv94ped@cs.umu.se> > > > > > > I got an error while making ./configure for a program. It said it > > > did not find png.h, but it's there as I have png-1.2.4 installed > > > on my system. > > > > > > Wrote the following test program: > > > > > > ---test.c > > > #include <png.h> > > > > > > int main() > > > { > > > return 0; > > > } > > > > > > Did then compile it with: > > > cc test.c > > > > > > Got the following error: > > > test.c:1: png.h: No such file or directory > > > > > > Did then try to compile it as this: > > > cc -I/usr/local/include test.c > > > > > > This worked! > > > > > > My question is: > > > How do one fix so /usr/local/include is searched automatically? > > > > > > If that can be done, the ./configure should work for the program > > > I'm trying to build. > > > I don't have an answer, but two questions instead (and a hint > > maybe): > > > > what does config.log say about that error? > > configure:5957: checking for PNG support > configure:5963: checking for png.h > configure:5973: cc -E conftest.c >/dev/null 2>conftest.out > configure:5969: png.h: No such file or directory > configure: failed program was: > #line 5968 "configure" > #include "confdefs.h" > #include <png.h> > configure:5996: checking for png_get_io_ptr in -lpng > configure:6015: gcc -o conftest -g -O2 conftest.c -lpng 1>&5 > /usr/libexec/elf/ld: cannot find -lpng > configure: failed program was: > #line 6004 "configure" > #include "confdefs.h" > /* Override any gcc2 internal prototype to avoid an error. */ > /* We use char because int might match the return type of a gcc2 > builtin and then its argument prototype would still apply. */ > char png_get_io_ptr(); > > int main() { > png_get_io_ptr() > ; return 0; } > configure:6037: checking if PNG package is complete > > > is the software publically available? > > Yep! and what is it? :) > > morale: don't trust configure, and if at all possible, double > > check what it tells you with its guts, and config.log > > I don't trust configure. :-) That's why I wrote my own test program. > Directory /usr/include is searched by gcc automatically, but it seems > /usr/local/include is not. I think that is somehow strange. Locally > installed packages/libraries with header files should be in gcc's > search path. doesn't that configure have a --enable-png[=/path/to/png/prefix] option or sumsuch? -- FreeBSD 4.6-STABLE 5:11PM up 7:25, 6 users, load averages: 0.05, 0.01, 0.00 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020713151247.GI322>