New configure/build system

The configure.inc script and much of the layout of the other files
has been borrowed from tvheadend
fix erroneous #if that occured during merge conflict resolution
Merge pull request #11 from adamsutton/feature/new-build-system

New configure/build system