Use cmake instead of make
Add readline detecting macro (USE_READLINE)

not complete
[incomplete] Use readline library

Build doesn't succeed.