I think just testing for $cache_file = /dev/null is simplest. That still fixes my problem and seems to work OK with a cache file specified too. I've committed that, let's see what breaks now ;)
Thanks! Hopefully, autoconf won't do something stupid and change their defaults later on. ;-) -- justin