Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Making autoconf search for C++ libraries

Tags:

c++

autoconf

I'm writing my first configure.ac and need to search for a C++ library.

I tried the following line, but when run the configure script, it finds nothing.

AC_SEARCH_LIBS([xmlpp::Document::get_root_node], [xml++-2.6])

Probably something is wrong with it. So, how can I make autoconf look for C++ libraries? I don't want to supply a global method (and don't think libxml++ has one either).

like image 333
moongoal Avatar asked May 19 '26 11:05

moongoal


1 Answers

You might want to try AX_CXX_CHECK_LIB from the Autoconf macro archive. you should probably make sure that you either use AC_LANG([C++]) or surround the call with AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]).

like image 154
Hasturkun Avatar answered May 22 '26 02:05

Hasturkun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!