[Box Backup-dev] Missing libs when building on Solaris

Stefan Norlin boxbackup-dev at fluffy.co.uk
Wed Feb 1 20:00:08 GMT 2006


> 2. This directive adds libraries if they are present, not if they are 
> necessary. Other platforms which have the libraries but don't need to link 
> them (the functions are defined in libc say) will end up carrying 
> unnecessary library dependencies.

Are you sure about this for AC_SEARCH_LIBS?

In the configure generated it seems it tries to link without any extra libs
first and only if that fails it searches for the function in the specified 
libs
and then tries to link with those. From my (sometimes limited) understanding
it would seem it performs exactly the kind of testing wanted.

For example libnsl is on linux but it not necessary in this case (only has
NIS functions and stuff) and it is not added to the makefile when the
AC_SEARCH_LIBS(gethostbyname, nsl socket resolv) is present
in configure.ac. From what I can tell it wouldn't even be added even
if gethostbyname was defined both in libc and libnsl (as an example)
since it tries to link without any extra libs first.

Stefan




More information about the Boxbackup-dev mailing list