Use WITH_XXX instead of HAVE_XXX to avoid conflicting with other kinds of test
Add BT_CHECK_LIB