[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AC_CHECK_LIB fails to locate a C++ library
From: |
Steve M. Robbins |
Subject: |
Re: AC_CHECK_LIB fails to locate a C++ library |
Date: |
Thu, 18 Oct 2001 14:03:29 -0400 |
User-agent: |
Mutt/1.3.23i |
On Thu, Oct 18, 2001 at 10:20:27AM -0700, Eric Hanchrow wrote:
> The program `conftest.cc' seems wrong to me: that's not a reliable way
> to test for the presence of a C++ function in a library.
> Unfortunately, I cannot think of a better way. This makes me wonder
> if I've misunderstood the intent of AC_CHECK_LIB -- perhaps it wasn't
> designed to do what I'm trying to do. (And yet the documentation
> clearly says
>
> Depending on the current language(*note Language Choice::), try to
> ensure that the C, C++, or Fortran 77 function FUNCTION is
> available
>
> , so ...)
>
> In any case, this problem isn't fatal: I'm able to reliably detect the
> library using AC_TRY_LINK. But doing so is a bit more complicated
> than AC_CHECK_LIB would be.
>
> So: is this a bug, or am I misunderstanding something?
I don't know any reasonable way to use AC_CHECK_LIB to detect a C++
library, and so I use AC_TRY_LINK.
Although in the specific case of CppUnit, I use the following
AM_PATH_CPPUNIT(1.6.1)
AM_CONDITIONAL(HAVE_CPPUNIT, test "$CPPUNIT_LIBS")
Regards,
-Steve
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants