Added configure scripts.

Basic dependency detection and assistance to user in installing missing dependencies. Automatic switch for USE_UPNP in makefile.