configure: make print_config() more flexible