diff --git a/configure.in b/configure.in index c031552..a906263 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ AC_INIT([mrw/mrw.hpp.in]) PACKAGENAME=mrw-c++ m4_define(x_major, 1) -m4_define(x_minor, 5) +m4_define(x_minor, 6) m4_define(x_least, 0) AM_INIT_AUTOMAKE(@PACKAGENAME@, @MAJOR@.@MINOR@.@LEAST@, [marc@waeckerlin.org]) @@ -94,12 +94,21 @@ AC_ARG_ENABLE(stacktrace, [have_stacktrace="$enableval"], [have_stacktrace="yes"]) AM_CONDITIONAL(HAVE_STACKTRACE, test "$have_stacktrace" = "yes") if test "$have_stacktrace" = "yes"; then - AC_SEARCH_LIBS(cplus_demangle, iberty, [AC_MSG_RESULT([OK])], + AC_SEARCH_LIBS(cplus_demangle, [demangle iberty], + [AC_MSG_RESULT([OK, found cplus_demangle])], [AC_MSG_ERROR([Library iberty is required!])]) - AC_SEARCH_LIBS(bfd_arch_list, bfd, [AC_MSG_RESULT([OK])], - [ac_cv_search_bfd_arch_list=; - ]AC_SEARCH_LIBS(bfd_arch_list, bfd, [AC_MSG_RESULT([OK])], - [AC_MSG_ERROR([BFD library libbfd is required])], [-lintl])) + AC_SEARCH_LIBS(bfd_arch_list, bfd, + [have_bfd="yes"; + AC_MSG_RESULT([OK, found bfd, no need for additional libs])], + [have_bfd="no"]) + if test "$have_bfd" != "yes"; then + unset ac_cv_search_bfd_arch_list + AC_SEARCH_LIBS(bfd_arch_list, bfd, + [AC_MSG_RESULT([OK, found bfd, but require more libs]) + LIBS="${LIBS:-} -lintl -liberty"], + [AC_MSG_ERROR([BFD library libbfd is required])], + [-lintl -liberty]) + fi fi # export macros @@ -107,6 +116,7 @@ AC_SUBST(HAVE_DOT) AC_SUBST(PACKAGENAME) AC_SUBST(AM_CXXFLAGS) AC_SUBST(AM_CPPFLAGS) +AC_SUBST(LIBS) # create output AC_CONFIG_FILES([makefile mrw-c++.spec