Bristol-Myers Squibb said on Friday that it had agreed to buy diabetes drug maker Amylin Pharmaceuticals Inc. for $5.3 billion. It will pay $31 a share for the San Diego company’s shares. That’s a 10 percent premium to Friday’s closing price. Bristol said it will be paid $3.4 billion by AstraZeneca to help develop Amylin’s drug pipeline. Amylin makes the diabetes injection Byetta.