configure: Add check_cc/require_cc helper functions to simplify some expressions