Feature #758
configure: have option to say to look for external libs
Description
Suggestion: let the user say ./configure --with-libgsl=search
so that a script searches for the appropriate library. Currently, if you want GSL, you have to look for it yourself, and then put in the path after --with-libgsl=
.
History
#1 Updated by John Abbott almost 9 years ago
When would this idea really be useful?
It makes sense really only for libraries which would normally have a system-wide installation (e.g. under /usr/local/lib/
).
Perhaps it could also look in a user's subtree for a "personal installation" (but this could be quite expensive if the script uses find
)
#2 Updated by John Abbott almost 9 years ago
If we do adopt this idea, what syntax should be used?
./configure --with-libgsl
./configure --with-libgsl=auto
./configure --with-libgsl=search
Other suggestions?
In any case, if the user says --with-libgsl
and the script cannot find it then an error should be signalled.
#3 Updated by Anna Maria Bigatti almost 9 years ago
John Abbott wrote:
If we do adopt this idea, what syntax should be used?
./configure --with-libgsl=auto
This is my preference. And I think it should only look for a system-wide installation.
Does libnormaliz have a system-wide installer?
While GSL is the only one, I regard this issue as low priority.
#4 Updated by John Abbott almost 9 years ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
Christof reports having seen a form like --with-extlib=system
to mean that extlib
is automatically sought in the "standard system directories".
JAA's interpretation is that first an attempt is made to see whether simply adding -lextlib
is enough to achieve compilation; if not then a script can search for extlib.a
or extlib.so
(or extlib.dylib
) in the usual system directories (a list maintained manually).
- library name is of the form
libXYZ
- the
-l
option should then be-lXYZ
- the file to look for should be
libXYZ.a
(or.so
or.dylib
)
What to do if several libraries are found? (e.g. static and dynamic ones)
Once the library have been found; the corresponding header file must also be found. Its name will presumably be XYZ.h
or XYZ.H
(or even XYZ.hpp
?)