libraries in /usr/local/lib

2006-07-13 Thread Mikulas Patocka

Hi

I am maintaining links browser. People complain to me that they can't compile 
it in graphics mode on OpenBSD because it can't find libraries that are placed 
in /usr/local/lib and includes in /usr/local/include.


The problem with libpng can be solved by using pkg-config, problem with libjpeg 
and libtiff can't be solved because you do not distribute .pc files for them.


I'd like to know:

Why does your distribution place libraries and includes to a place where 
compiler can't find them?


What's the correct standard solution for a software developer to find 
libraries? I thought that if gcc -llibrary works, library is presend and if gcc 
-llibrary doesn't work, library isn't present.


It is possible to add -I/usr/local/include -L/usr/local/lib to compiler flags, 
I even distributed links with that for some time, and it turned out that on 
other unix systems -L/usr/local/lib reversed search (first /usr/local/lib and 
then /usr/lib, while it used to be /usr/lib first) and caused linking failures.


Mikulas



Re: libraries in /usr/local/lib

2006-07-13 Thread Han Boetes
Mikulas Patocka wrote:
 It is possible to add -I/usr/local/include -L/usr/local/lib to compiler 
 flags, I even distributed links with that for some time, and it turned out 
 that on other unix systems -L/usr/local/lib reversed search (first 
 /usr/local/lib and then /usr/lib, while it used to be /usr/lib first) and 
 caused linking failures.

export CPPFLAGS='-I/usr/local/include' LIBS='-L/usr/local/lib'


# Han



Re: libraries in /usr/local/lib

2006-07-13 Thread Pawel S. Veselov

try if '-isystem/usr/local/include' works first, -I is bad

Han Boetes wrote:

Mikulas Patocka wrote:
  
It is possible to add -I/usr/local/include -L/usr/local/lib to compiler 
flags, I even distributed links with that for some time, and it turned out 
that on other unix systems -L/usr/local/lib reversed search (first 
/usr/local/lib and then /usr/lib, while it used to be /usr/lib first) and 
caused linking failures.



export CPPFLAGS='-I/usr/local/include' LIBS='-L/usr/local/lib'


# Han