From owner-freebsd-questions Sat Jul 13 7:49: 3 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7273637B401 for ; Sat, 13 Jul 2002 07:48:56 -0700 (PDT) Received: from tninet.se (lennier.tninet.se [195.100.94.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6E9BC43E3B for ; Sat, 13 Jul 2002 07:48:55 -0700 (PDT) (envelope-from tdv94ped@cs.umu.se) Received: from cs.umu.se (h30n1c1o1023.bredband.skanova.com [213.64.164.30]) by lennier.tninet.se (BMR ErlangTM/OTP 3.0) with ESMTP id 894552.571733.1026.0s45182977lennier ; Sat, 13 Jul 2002 16:48:53 +0200 Message-ID: <3D303DC6.CD4A5CFB@cs.umu.se> Date: Sat, 13 Jul 2002 16:48:38 +0200 From: Paul Everlund X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) X-Accept-Language: sv,en MIME-Version: 1.0 To: Roman Neuhauser Cc: freebsd-questions@freebsd.org Subject: Re: Include files in /usr/local/include not found References: <3D3013EA.C0904498@cs.umu.se> <20020713140607.GH322@freepuppy.bellavista.cz> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Roman Neuhauser wrote: > > > Date: Sat, 13 Jul 2002 13:50:02 +0200 > > From: Paul Everlund > > To: freebsd-questions@freebsd.org > > Subject: Include files in /usr/local/include not found > > > > Hi! > > > > 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 > > > > 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 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! > 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. Thanks for your reply! Best regards, Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message