$HAVE{erfl} = check_lib( function => 'foo();if(libversion() > 5) return 0; else return 1;' incpath => ... libpath => ... lib => ... header => ... ); if( $HAVE{erfl} ) { # set CC define HAVE_ERFL };