if (test "$BootingFromHc" = "NO"); then
AC_HAPPY
fi;
-#
-#
-dnl ** check for installed lx binary
-#
-AC_PATH_PROG(LxCmd,lx)
#### program checking section ends here ####
AC_SUBST(HaveLibGmp)
#
-dnl ** check whether this machine has BFD installed (used for debugging)
+dnl ** check whether this machine has BFD and liberty installed (used for debugging)
+dnl ** the order of these tests matters: bfd needs liberty
#
-AC_CHECK_LIB(bfd, bfd_init)
+AC_CHECK_LIB(iberty, xmalloc)
+AC_CHECK_LIB(bfd, bfd_init)
#
# Misc