example.cpp: check params and show usage

example.cpp needs to validate the parameters passed to it and
show a usage message if the parameters are invalid.
build: add ubiquitous autotools build scripts