Installing ghostscript on MacPorts failed
You either didn't install the Xcode Command Line Tools (use xcode-select --install to do that), or didn't accept the Xcode License agreement (that can be achieved using sudo xcodebuild -license).

Once you've completed both of these checks, configure should correctly pick up the working compiler.

MacPorts 2.3 will contain checks to detect and warn you about these problems.