Add a CP basic test
Add autotools files to .gitignore
Fix missing -i for autoreconf
Full rework of the sources

Mostly adding error checks.