[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: checking twice the same library with AC_CHECK_LIB

From: Peter Breitenlohner
Subject: Re: checking twice the same library with AC_CHECK_LIB
Date: Fri, 18 Mar 2011 16:00:04 +0100 (CET)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Fri, 18 Mar 2011, Vincent Torri wrote:

on Windows, with mingw, libbfd may depend on gettext (libintl, more precisely). I would like to do something like:

AC_CHECK_LIB([bfd], [bfd_openr],
if test "x$have_bfd" = "xno" ; then
  AC_CHECK_LIB([bfd], [bfd_openr],
     [bfd_libs="-lbfd -lintl"],
     [AC_MSG_ERROR([the symbol bfd_openr can not be found])],

On my system, binutils is sufficiently recent, hence libbfd depends on libintl. So the first test fails. But with the cache feature, the second test also fails.

The simplest and safest way is to do the second test with a different
symbol.  Alternatively you could unset ac_cv_lib_bfd_bfd_openr (unless you
have an ancient broken shell).

Peter Breitenlohner <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]