Increase the detail given when BFD not found

master
David Allsopp 2017-03-21 11:16:31 +00:00
parent 17fc532c74
commit 28e8cb3b4a
1 changed files with 22 additions and 4 deletions

26
configure vendored
View File

@ -1790,12 +1790,30 @@ echo "X11_LINK=$x11_link" >> Makefile
# Look for BFD library
if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \
sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl -liberty -lz bfd_openr; then
if $shared_libraries_supported && ./hasgot -DPACKAGE=ocaml -i bfd.h ; then
inf "BFD library found."
echo "#define HAS_LIBBFD" >> s.h
echo "LIBBFD_LINK=-lbfd -ldl -liberty -lz" >> Makefile
echo LIBBFD_INCLUDE= >>Makefile
if sh ./hasgot -DPACKAGE=ocaml -lbfd bfd_openr; then
LIBBFD_LINK="-lbfd"
inf "BFD links with $LIBBFD_LINK"
echo "#define HAS_LIBBFD" >> s.h
elif sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl bfd_openr; then
LIBBFD_LINK="-lbfd -ldl"
inf "BFD links with $LIBBFD_LINK"
echo "#define HAS_LIBBFD" >> s.h
elif sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl -liberty bfd_openr; then
LIBBFD_LINK="-lbfd -ldl -liberty"
inf "BFD links with $LIBBFD_LINK"
echo "#define HAS_LIBBFD" >> s.h
elif sh ./hasgot -DPACKAGE=ocaml -lbfd -ldl -liberty -lz bfd_openr; then
LIBBFD_LINK="-lbfd -ldl -liberty -lz"
inf "BFD links with $LIBBFD_LINK"
echo "#define HAS_LIBBFD" >> s.h
else
wrn "Could not determine link options for the BFD library"
LIBBFD_LINK=
fi
echo "LIBBFD_LINK=$LIBBFD_LINK" >> Makefile
elif sh ./hasgot -DPACKAGE=ocaml -I/opt/local/include -i bfd.h && \
sh ./hasgot -DPACKAGE=ocaml -L/opt/local/lib -lbfd -ldl \
-liberty -lz -lintl bfd_openr