Rework optional dependency checking code

Now configure exists with error in case user has requested to enable
certain feature but its dependency hasn't been found.

Also, use AS_HELP_STRING and ensure proper m4 quoting around it.