c++ - Check external package in Autotools -


i check presence of google sparsehash package in c++ program autotools.

here minimal configure.ac:

ac_prereq([2.69]) ac_init([myprog], [1.0], [adress@email.com]) ac_config_srcdir([main.cpp]) ac_config_headers([config.h]) am_init_automake([foreign -wall -werror])  ac_prog_cxx ac_prog_cc ac_check_headers([google/sparse_hash_map])  ac_config_files(makefile) ac_output 

i run autoreconf -vfi, ./configure, , get:

checking google/sparse_hash_map usability... no checking google/sparse_hash_map presence... no checking google/sparse_hash_map... no 

however, can check presence of /usr/include/google/sparse_hash_map, c++ file, thin wrapper around /usr/include/google/sparsehash/sparsehashtable.h. moreover, tiny code:

#include <google/sparse_hash_map> int main() {return 1;} 

compiles , executes fine using g++ test.cpp.

any suggestion newbie?

the ac_check_header macro using c compiler default. can change current language using: ac_lang([c++]) or: ac_lang_push([c++]) / ac_lang_pop - described in (single-page) manual. e.g.,

... ac_lang([c++]) ac_check_headers([google/sparse_hash_map]) # still in c++ 'mode' 

or:

... ac_lang_push([c++]) ac_check_headers([google/sparse_hash_map]) ac_lang_pop([c++]) # restored previous language 'mode' 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -