Joao Miguel Ferreira wrote:
>> Same as with Linux:
>>
>> -I/usr/local/include
>>
> 
>> -L path-to-library-at-link-time -R path-to-library-at-runtime
>>
> 
> Hi Bart,
> 
> thank you... but...
> 
> my test applications are also instaled with the GNU Autotools. My
> problem is that, during the ./configure phase, configure can't find the
> header files in /usr/local/include. If, I install the header files
> in /usr/include configure will find them and things work just fine.
> 
> The same goes for the lib. If I install the lib in /usr/lib the Solaris
> loader is able to find the lib and run the program. But if I put it in
> the default Autotools dir /usr/local/lib the Solaris "ld" will not find
> it... :(
> 
> 
> So, I order to automate things with Autotools, I need that the default
> search paths for headers and libs also takes /usr/local/include
> and /usr/local/lib into consideration....
> 
> Is this possible ?
> 
> thanks again
> Joao
> 
> 
> 

Yes... but in general, it's considered poor form to force
all applications to use alternate search paths.  You can
do so if you wish w/ crle:

   DESCRIPTION
      The crle utility provides for the creation and display of  a
      runtime  linking  configuration file. The configuration file
      is read and interpreted by the runtime  linker,  ld.so.1(1),
      during process start-up. Without any arguments, or with just
      the -c option, crle displays configuration information. This
      information  includes  the contents of a configuration file,
      any system defaults and the command-line required to  regen-
      erate  the  configuration  file.  When  used  with any other
      options, a new configuration file is created or updated.

I recommend instead that you link the application with a
application specific ld.config file using the -c option to ld.
You can even make the path to the config file relative to the
application binary.

- Bart


-- 
Bart Smaalders                  Solaris Kernel Performance
barts at cyber.eng.sun.com              http://blogs.sun.com/barts

Reply via email to