Fix bfd detection on systems missing -libertyamule-svn-r10864
commitaf30f07b085b6c70dfd3ac411d3dce6c7c819274
authorupstream svn <svn@amule.org>
Sun, 18 Jan 2015 21:01:28 +0000 (18 21:01 +0000)
committerDévai Tamás <gonosztopi@amule.org>
Sun, 18 Jan 2015 21:21:55 +0000 (18 21:21 +0000)
tree90b6663d56da82ce0cf30ae9f87839c1ca6f63f0
parent59345f0213f9fb03ebe005aa6523a4d0e6b2df13
Fix bfd detection on systems missing -liberty

Ubuntu 14.04 is an example of a system where bfd detection failed, because
-liberty was unconditionally included on the linker command line. The current
approach will always find the smallest subset of libraries required to link
with bfd, although it might have to run *a lot* of tests to accomplish that.

As it turns out, on many somewhat modern systems -lbfd is enough. However, I
left the possibility for systems requiring -liberty too.

While already at it, I grabbed the possibility to
  - move bfd detection to its own file :-)
  - add more descriptive error message on failure, distinguish between
    "header not found" and "cannot link to library"
  - cache the result of the test to speed up further configure runs.  This
    obviously works only if a cache file was specified on the command line...
38 files changed:
.svn-revision
Makefile.in
acinclude.m4
aclocal.m4
config.h.in
configure
configure.in
docs/Changelog
docs/Makefile.in
docs/man/Makefile.in
m4/bfd.m4 [new file with mode: 0644]
src/Makefile.in
src/libs/Makefile.in
src/libs/common/Makefile.in
src/libs/ec/Makefile.in
src/libs/ec/cpp/Makefile.in
src/pixmaps/Makefile.in
src/pixmaps/flags_xpm/Makefile.in
src/skins/Makefile.in
src/utils/Makefile.in
src/utils/aLinkCreator/Makefile.in
src/utils/aLinkCreator/docs/Makefile.in
src/utils/aLinkCreator/src/Makefile.in
src/utils/cas/Makefile.in
src/utils/cas/docs/Makefile.in
src/utils/fileview/Makefile.in
src/utils/plasmamule/Makefile.in
src/utils/wxCas/Makefile.in
src/utils/wxCas/docs/Makefile.in
src/utils/wxCas/src/Makefile.in
src/utils/xas/Makefile.in
src/utils/xas/docs/Makefile.in
src/webserver/Makefile.in
src/webserver/default/Makefile.in
src/webserver/src/Makefile.in
unittests/Makefile.in
unittests/muleunit/Makefile.in
unittests/tests/Makefile.in