Automatically detect base in config.