This topic has been thoroughly discussed, boiled, stir-fried, and steamed in The Great Vegetarian Debate Thread
The first precept is broken in four ways:
- One kills a living being with one's own hand
- One urges another to kill
- One permits another to kill when one has the power to prevent it
- One approves of killing
In the cases you cited, where you are offered meat, or where there is no other food available, then you have no intention to deprive living beings of life. Meat is well and truly dead already, so eating meat does not break the first precept.