configure: add functions for testing code fragments