improve configure.ac: add check code for header/lib/module.
add configure check