On Wed, May 28, 2008 at 5:34 PM, Johan Oudinet <johan.oudinet@xxxxxxxxx> wrote: > Hello, > > I use the Boost Graph Library (BGL) for my software, and I link to the > boost_graph library. > I already use a m4 macro - from autoconf-archive - to check if the BGL > headers are present, but this macro doesn't link to libboost_graph.a > I tried this: > # Boost headers (from autoconf-archive) > AX_BOOST_BASE([1.33]) > # Boost graph library > AC_LANG_PUSH(C++) > AC_CHECK_LIB([boost_graph], [read_graphviz], , AC_MSG_ERROR([This > package needs libboost_graph])) > AC_LANG_POP > > Unfortunately, the generated code is wrong (since it doesn't use the > right signature for read_graphviz). > > Any idea ? > I found a workaround by using a default function (like exit) to check if libboost_graph exists. Now it works with AC_CHECK_LIB but not with AC_SEARCH_LIBS because the exit function doesn't need any library. Since I know this library is mandatory for the read_graphviz function, it's OK. But I would know how to check the presence of a function defined in a namespace, or with template parameters ? -- Johan _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf