Exhibit 10.40

SECOND AMENDMENT AGREEMENT

This
SECOND AMENDMENT AGREEMENT dated as of October 22, 2001 (this "Amendment Agreement"), by and between VERSICOR INC., a Delaware corporation (the
"Company"), andFLEET NATIONAL
BANK(the "Bank").

WHEREAS, the Loan Agreement (as defined below) provides for a Term Loan from the Bank to the Company;

WHEREAS,
on the date hereof, the outstanding aggregate principal amount of the Term Loan is $3,879,000 and the Bank and the Company wish to modify the provisions of the Loan Agreement to
add a new loan as set forth herein;

WHEREAS,
the Bank has previously agreed to terminate the Put Agreement from Sepracor Inc. ("Sepracor") and the Control and Security
Agreement made by the Company in favor of the Bank;

NOW,
THEREFORE, in consideration of the foregoing and the agreements contained herein, the parties hereby agree as follows:

1.Reference to Loan Agreement.

Reference
is made to the Revolving Credit, Term Loan and Security Agreement dated as of December 31, 1996 as amended by the First Amendment Agreement dated as of
December 30, 1997 (as the same may be further amended and restated from time to time, the "Loan Agreement"), by and between the Company and the
Bank. Capitalized terms used herein which are defined in the Loan Agreement have the same meanings herein as therein, except to the extent that such meanings are amended hereby.

2.Amendments.

The
Company and the Bank agree that the Loan Agreement is hereby amended, effective as of the date hereof, as follows:

(a)Additions to Section 1.1 of the Loan Agreement.The following definitions are hereby added to
Section 1.1 of the Loan Agreement:



|Debt Service Coverage Ratio        |  | Applicable Margin (% per annum)
|---------------------------------- |  | -------------------------------
|Less than 1.50 to 1                |  | 2.750%                         
|Greater than or equal to 1.50 to 1 |  | 2.000%                         

For
purposes hereof, a "Payment Period" means (i) initially, the period commencing on the date of the consummation of the transactions described in the Second Amendment Agreement
to and including the third Business Day after the date of delivery of the quarterly financial statements required by Section 5.1(b) for the fiscal quarter of the Company ended June 30,
2001 (the "Initial Payment Period") and (ii) thereafter, the period commencing on the day immediately succeeding the last day of the prior Payment Period to but not including the third Business
Day after the earlier of (x) the due date of the
next compliance certificate required to be delivered by the Company to the Bank pursuant to Section 5.1(d) concurrently with the delivery by the Company of the annual or quarterly financial

1

---

statements required by Sections 5.1(a) or 5.1(b), respectively, or (y) the date of the actual receipt by the Bank of such compliance certificate. Subject to and in accordance with the final
paragraph of this definition, the Applicable Margin shall be effective for each Payment Period (or in the circumstances described in the final paragraph of this definition, such portion of a Payment
Period) whether or not such Payment Period coincides with a LIBOR Period for LIBOR Portion.

The
Debt Service Coverage Ratio for any Payment Period except the Initial Payment Period shall be determined on the basis of the compliance certificate required to be delivered to the
Bank pursuant to Section 5.1(d) concurrently with the delivery by the Company of the annual or quarterly financial statements required by Sections 5.1(a) or 5.1(b), respectively, setting forth,
among other things, a calculation of the Debt Service Coverage Ratio as at the last day of the fiscal quarter immediately preceding such Payment Period (i.e. the Debt Service Coverage Ratio set forth
in the compliance certificate delivered pursuant to Section 5.1(d) that is delivered together with the quarterly financial statements for the fiscal quarter ended June 30, 2001 shall be
used to determine the Applicable Margin with respect to the first Payment Period that follows the Initial Payment Period, the Debt Service Coverage Ratio set forth in the compliance certificate that
is delivered together with the financial statements for the fiscal quarter ended September 30, 2001 shall be used to determine the Applicable Margin with respect to the second Payment Period
that follows the Initial Payment Period, and so forth).

Anything
in this Agreement to the contrary notwithstanding, the Applicable Margin shall be the rate effective for a Debt Service Coverage Ratio less than 1.50 to 1 if the compliance
certificate shall not be delivered when required by Section 5.1(d) (but only with respect to the portion of such Payment Period prior to the delivery of such certificate).

Debt Service Coverage Ratio.As at any date, the ratio of (a) EBITDA for the period of twelve consecutive months
ending on or most recently ended prior to such date to (b) the sum, for the Company and its Subsidiaries (determined on a consolidated basis without duplication in accordance with GAAP) of
(i) all regularly scheduled payments of principal of any Indebtedness (including the principal component of any payments in respect of Capital Leases) for such period plus, (ii) all
Interest Expense for such period, plus (iii) the aggregate amount of all Non-Financed Capital Expenditures made during such period (excluding payment of Capital Leases to the extent
included in principal payments or Interest Expense for such period).

EBITDA.For any period, operating income for the Company and its Subsidiaries (determined on a consolidated basis without
duplication in accordance with GAAP) for such period (calculated before taxes, Interest Expense, depreciation, amortization, other non-cash income (other than receivables arising in the
ordinary course of business) or charges accrued for such period) and (except to the extent received or paid in cash by the Company) income or loss attributable to equity in Affiliates for such period,
excluding (i) any extraordinary and unusual gains or losses during such period, and (ii) the
proceeds of insurance and asset sales received by the Company or any of its Subsidiaries during such period.

Equipment Loan Availability Period.The period commencing on the date of the Second Amendment Agreement and ending on
June 30, 2002.

Equipment Loan Commitment Amount.Two Million Dollars ($2,000,000).

Equipment Loan Maturity Date. December 31, 2004.

Interest Expense.For any period, the sum for the Company and its Subsidiaries (determined on a consolidated basis without
duplication in accordance with GAAP), of the following: (a) all interest paid or payable during such period by the Company and its Subsidiaries in respect of Indebtedness for

2

---

borrowed money plus (b) all fees, including Letter of Credit fees and expenses, incurred hereunder during such period.

Net Outstanding Amount of Accounts.As of any date, the net amount of Accounts Receivable of the Company outstanding on such
date after (a) eliminating from the aggregate amount of outstanding Accounts (i) such Accounts past due under the original terms of sale more than sixty (60) days, (ii) any
Account owed by any account debtor whose principal place of business or chief executive office is not within the United States or the District of Columbia ("Foreign Account
Debtors"), (iii) such Accounts due from Affiliates or Subsidiaries of the Company, (iv) such Accounts for services not yet rendered or goods not yet delivered,
and (v) such Accounts representing obligations in respect of any joint venture interest owned by the Company and in respect of royalties and license fees payable to the Company by any such
joint venture or any joint venture therein, and (b) deducting from the aggregate face amount of the remaining Accounts Receivable of the Company (i) net offsets from accounts owing from
account debtors, other than foreign account debtors, which maintain both receivable and payable balances with the Company, (ii) the aggregate amount of outstanding claims asserted by account
debtors, other than foreign account debtors, against the Company and (iii) all payments, adjustments, and credits applicable thereto and all amounts due thereon considered by the Bank to be
difficult to collect or uncollectible by reason of return, rejection, repossession, loss or damage of or to the merchandise giving rise thereto, a merchandise or other dispute, insolvency of the
account debtor or any other reason, all as determined by the Bank in its sole and reasonable discretion, which determination shall be final and binding upon the Company.

Non-Financed Capital Expenditures.For any period, all Capital Expenditures made by the Company and its
Subsidiaries during such period that have not been funded, directly or indirectly, with the proceeds of purchase money financing (including, without limitations, Capital Leases) other than the
proceeds of the Loans.

Second Amendment Agreement.The Second Amendment Agreement dated as of October 22, 2001 between the Bank and the
Company.

Senior Liabilities.As at any date, any and all liabilities of the Company and its Subsidiaries on such date on a
consolidated basis determined in accordance with GAAP, excluding any Subordinated Indebtedness.

Tangible Capital Base.At any date as of which the amount thereof shall be determined, the stockholders' equity of the
Company and its Subsidiaries determined on a consolidated basis in accordance with GAAPplusthe outstanding principal amount of any Subordinated
Indebtednessminusthe sum of any amounts attributable to (a) goodwill, (b) intangible items such as unamortized debt discount and
expense, patents, trade and service marks and names, copyrights and research and development expenses except prepaid expenses, (c) all reserves not already deducted from assets, (d) any
write-up in the book value of assets resulting from any revaluation thereof subsequent to December 31, 2000 and (e) any and all items included as assets on the consolidated
balance sheet of the Company and its Subsidiaries if and to the extent such items consist of the equity in Subsidiaries or other joint ventures holdings or similar Investments.

(c)Modifications to Section 1.1 of the Loan Agreement.





3

---





(d)Deletion of Put Agreement.All references in the Loan Agreement to the Put Agreement, including the
definition in Section 1.1, are hereby deleted.

(e)Deletion of Control and Security Agreement.All references in the Loan Agreement to the Control and Security
Agreement, including the definition in Section 1.1, are hereby deleted.

(f)Addition of Section 2A.Section 2A of the Loan Agreement as set forth below is hereby added to
the Loan Agreement immediately following Section 2:

SECTION 2A

DESCRIPTION OF EQUIPMENT LOANS



4

---





5

---



6

---







2A.5Method of Payment.All payments and prepayments of principal and all payments of interest on the Equipment
Loans shall be made by the Company to the Bank at 100 Federal Street, Boston, Massachusetts 02110 in immediately available funds, on or before 11:00 a.m. on the due date thereof, free and clear
of, and without any deduction or withholding for, any taxes or other payments. The Bank may, and the Company hereby authorizes the Bank to, debit the amount of any payment not made by such time to the
demand deposit account of the Company with the Bank.

2A.6Overdue Payments.(a) Upon the occurrence and during the continuance of an Event of Default,
interest on the outstanding principal amount of any Note and (to the extent permitted by law) on accrued but unpaid interest shall thereafter be payable on demand at a rate per annum equal to two
percent (2%) above the interest rate otherwise in effect with respect to such Loan. Upon the cure of an Event of Default and the payment of interest at the default rate through the date of such cure,
the interest rate shall revert to that provided for in Section 2A.7.



2A.7Interest.The Equipment Note shall bear interest on the unpaid principal amount thereof until paid in full
at the rate or rates per annum determined (on the basis of the actual number of days elapsed over a 360-day year) and payable as follows:



7

---



2A.8Certain LIBOR Provisions.



Banking Day.(i) When used with respect to the LIBOR Option, a day on which transactions may be effected in deposits
of U.S. dollars in the London interbank foreign currency deposits market and on which banks may conduct business in London, England and Boston, Massachusetts and (ii) when used with respect to
the other provisions of this Agreement, any day excluding Saturday and Sunday and excluding any other day which shall be in Boston, Massachusetts, a legal holiday or a day on which banking
institutions are authorized by law to close.

Board.The Board of Governors of the Federal Reserve System of the United States.

Legal Requirement.Any requirement imposed upon the Bank by any law of the United States of America or the United Kingdom or
by any regulation, order, interpretation, ruling or official directive (whether or not having the force of law) of the Board, the Bank of England or any other board, central bank or governmental or
administrative agency, institution or authority of the United States of America, the United Kingdom or any political subdivision of either thereof.

LIBOR Option.The option granted pursuant to this Section 2A to have the interest on all or a portion of the principal
amount of the Equipment Loan based on a LIBOR Rate.

LIBOR Period.Any period, as provided below in this Section 2A.8, of 30, 60, 90 or 180 days, commencing on any
Banking Day;provided, however, that no LIBOR Period with respect to any LIBOR Portion of any Equipment Loan shall extend beyond the Equipment Loan
Maturity Date. If any LIBOR Period so selected would otherwise end on a date which is not a Banking Day, such LIBOR Period shall instead end on the next preceding or succeeding Banking Day as
determined by the Bank in accordance with the then current banking practice in London. Each determination by the Bank of any LIBOR Period shall, in the absence of manifest error, be conclusive, and at
the Company's request the Bank shall demonstrate the basis for such determination.

LIBOR Portion.That portion of the Equipment Loan specified in a LIBOR Request, (i) which is not less than Two Hundred
Dollars ($250,000), (ii) which is an integral multiple of Ten Thousand Dollars ($10,000), (iii) which does not exceed the outstanding balance of the Equipment Loans not already subject
to an exercised LIBOR Option, (iv) which, as of the date of the LIBOR Request specifying such LIBOR Portion, has met the conditions for basing interest on the LIBOR Rate in Section 2A.9
of this Agreement and (v) the LIBOR Period of which has commenced and not terminated.

LIBOR Premium.With respect to the prepayment of any LIBOR Portion of any Equipment Loan, whether voluntary or as a result of
acceleration, an amount equal to the product of (i) the excess, if any, of the rate of interest on the principal amount so prepaid over the rate of interest on debt securities issued by the
Treasury of the United States of America on a date approximating the date of payment of such principal amount and having a maturity date approximating the last Banking Day of the applicable LIBOR
Period, multiplied by (ii) the principal amount so prepaid, multiplied by (iii) a fraction, the numerator of which is the number of days remaining in the related LIBOR Period and the
denominator of which is 360.

LIBOR Rate.With respect to any LIBOR Portion for the related LIBOR Period, an interest rate per annum (rounded upwards, if
necessary, to the next higher 1/8 of 1%) equal to the product of (a) the

8

---

Base LIBOR Rate (as hereinafter defined) and (b) Statutory Reserves. For purposes of this definition, the term "Base LIBOR Rate" shall mean the
rate (rounded to the nearest 1/8 of 1% or, if there is no nearest 1/8 of 1%, the next higher 1/8 of 1%) at which deposits of U.S. dollars approximately
equal in principal amount to the LIBOR Portion and for a maturity equal to the applicable LIBOR Period are offered to the Bank in the London interbank foreign currency deposits market at approximately
11:00 a.m., London time, two (2) Banking Days prior to the commencement of such LIBOR Period, for delivery on the first day of such LIBOR Period. Each determination by the Bank of any
LIBOR Rate shall, in the absence of manifest error, be conclusive, and at the Company's request, the Bank shall demonstrate the basis for such determination.

LIBOR Request.Notice in writing (or by telephonic communications confirmed by telex, telecopy or other facsimile
transmission on the same day as the telephone request) from the Company to the Bank requesting that interest on a LIBOR Portion be based on the LIBOR Rate, specifying: (i) the first day of the
LIBOR Period, (ii) the length of the LIBOR Period consistent with the definition of that term and (iii) a dollar amount of the LIBOR Portion consistent with the definition of that term.

Statutory Reserves.A fraction, the numerator of which is the number one and the denominator of which is the number one minus
the aggregate of the maximum reserve percentages (including, without limitation, any marginal, special, emergency or supplemental reserves), expressed as a decimal, established by the Board and any
other banking authority to which the Bank is subject for Eurocurrency Liabilities (as defined in Regulation D of the Board). Such reserve percentages shall include, without limitation, those
imposed under such Regulation D. LIBOR Portions of the Equipment Loans shall be deemed to constitute Eurocurrency Liabilities and as such shall be deemed to be subject to such reserve
requirements without benefit of or credit for proration, exceptions or offsets which may be available from time to time to the Bank under such Regulation D. Statutory Reserves shall be adjusted
automatically on and as of the effective date of any change in any reserve percentage.

Tax.In relation to any LIBOR Portion and the applicable LIBOR Rate, any tax, levy, impost, duty, deduction, withholding or
other charges of whatever nature required by any Legal Requirement (i) to be paid by the Bank and/or (ii) to be withheld or deducted from any payment otherwise required hereby to be made
by the Company to the Bank,providedthat the term "Tax" shall not include any taxes imposed upon the net income of the Bank by the United States of
America or any political subdivision thereof (including state and local governmental authorities).

2A.9Conditions for Basing Interest on the LIBOR Rate.Upon the condition that:



9

---



then
interest on the LIBOR Portion requested during the LIBOR Period requested will be at the applicable LIBOR Rate.

2A.10.Indemnification for Funding and Other Losses.Each LIBOR Request shall be irrevocable and binding on the
Company. Without limiting the generality of Section 2A.11, the Company shall indemnify the Bank against any loss or expense incurred by the Bank as a result of any failure on the part of the
Company to fulfill, on or before the date specified in any LIBOR Request, the applicable conditions set forth in this Agreement, including, without limitation, any loss (including loss of anticipated
profits) or expense incurred by reason of the liquidation or redeployment of deposits or other funds acquired by the Bank to fund or maintain the requested LIBOR Portion when interest on such LIBOR
Portion, as a result of such failure on the part of the Company, is not based on the applicable LIBOR for the requested LIBOR Period. The Bank shall determine the amount of such loss or expense
incurred by it, and absent manifest error such determination shall be conclusive, and at the Company's request the Bank shall demonstrate the basis for such determination.

2A.11.Change in Applicable Laws, Regulations, etc.If any Legal Requirement shall make it unlawful for the Bank
to fund through the purchase of U.S. dollar deposits any LIBOR Portion, or otherwise to give effect to its obligations as contemplated hereby, or shall impose on the Bank any costs based on or
measured by the excess above a specified level of the amount of a category of deposits or other liabilities of the Bank, which includes deposits by reference to which the LIBOR Rate is determined as
provided herein or a category of extensions of credit or other assets of the Bank which includes any LIBOR Portion, or shall impose on the Bank any restrictions on the amount of such a category of
liabilities or assets which the Bank may hold, (a) the Bank may by notice thereof to the Company terminate the LIBOR Option, (b) any LIBOR Portion subject thereto shall immediately bear
interest
thereafter at the rate provided for in Section 2A.7(a), and (c) the Company shall indemnify the Bank against any loss, penalty or expense incurred by the Bank by reason of the
liquidation or redeployment of deposits or other funds acquired by the Bank to fund or maintain such LIBOR Portion, as provided in Section 2A.10.

2A.12Taxes.It is the understanding of the Company and the Bank that the Bank shall receive payments of amounts
of principal of and interest on the Equipment Loan with respect to the LIBOR Portions from time to time subject to a LIBOR Option free and clear of, and without deduction for, any Taxes. If
(a) the Bank shall be subject to any such Tax in respect of any such LIBOR Portion or part thereof or (b) the Company shall be required to withhold or deduct any such Tax from any such
amount, and (c) such Tax shall not have existed as of the date of the applicable LIBOR Request, the LIBOR applicable to such LIBOR Portion shall be adjusted by the Bank to reflect all
additional costs incurred by the Bank in connection with the payment by the Bank or the withholding by the Company of such Tax and the Company shall provide the Bank with a statement detailing the
amount of any such Tax actually paid by the Company. Determination by the Bank of the amount of such costs shall, in the absence of manifest error, be conclusive, and at the Company's request, the
Bank shall demonstrate the basis of such determination. If after any such adjustment, any part of any Tax paid by any Bank is subsequently recovered by the Bank, the Bank shall reimburse the Company
to the extent of the amount so recovered. A certificate of an officer of the Bank setting forth the amount of such recovery and the basis therefor shall, in the absence of manifest error, be
conclusive.



10

---



11

---



12

---

9.1Notices.Unless otherwise specified herein, all notices hereunder to any party hereto shall be in writing
and shall be deemed to have been given when delivered by hand, or three (3) days after being properly deposited in the mails postage prepaid, or when sent by telex, answerback received, or
electronic facsimile transmission, or when delivered to the telegraph company or overnight courier, addressed to such party at its address indicated below:



(n)Amendment to Exhibit C.Exhibit C is replaced by Exhibit C attached hereto.

3.No Default; Representations and Warranties, etc.

The
Company hereby confirms that: (a) except as set forth on the Disclosure Schedule attached hereto, the representations and warranties of the Company contained in
Section 4 of the Loan

13

---

Agreement are true on and as of the date hereof as if made on such date (except to the extent that such representations and warranties expressly relate to an earlier date); (b) the Company is
in compliance in all material respects with all of the terms and provisions set forth in the Loan Agreement on its part to be observed or performed thereunder; and (c) after giving effect to
this Amendment Agreement, no Event of Default specified in Section 8 of the Loan Agreement, nor any
event which with the giving of notice or expiration of any applicable grace period or both would constitute such an Event of Default, shall have occurred and be continuing.

4.Conditions to this Amendment Agreement.

Concurrently
herewith (and as conditions to the Bank's consent to this Amendment Agreement), the Company will furnish the Bank with the following:

(a)  This
Amendment Agreement duly executed by the Company;

(b)  The
Equipment Note duly executed by the Company;

(c)  A
certificate of the Secretary or an Assistant Secretary of the Company with respect to resolutions of the Board of Directors authorizing the execution and delivery of
this Amendment Agreement, the Equipment Note and identifying the officer(s) authorized to execute, deliver and take all other actions required under this Amendment Agreement, and providing specimen
signatures of such officers;

(d)  Lien
searches against the Company in all appropriate jurisdictions;

(e)  a
landlord's consent and estoppel with respect to the Company's leasehold properties located in Fremont, California and King of Prussia, Pennsylvania, each in a form
satisfactory to the Bank and its counsel,

(f)    an
insurance binder demonstrating compliance with Section 5.3 of the Loan Agreement,

(g)  the
certificate of incorporation of the Company and all amendments and supplements thereto, filed in the office of the Secretary of State of the State of Delaware, each
certified by said Secretary of State as being a true and correct copy thereof;

(h)  the
Bylaws of the Company and all amendments and supplements thereto, certified by the Secretary or an Assistant Secretary as being a true and correct copy thereof;

(i)    a
certificate of the Secretary of State of the State of Delaware, as to legal existence and good corporate standing of the Company in such state and listing all
documents on file in the office of said Secretary of State;

(j)    The
Bank's security interest in the Collateral (as defined in Section 7.1 as amended by this Amendment Agreement) shall continue to be a first priority perfected
security interest subject only to Permitted Encumbrances and such UCC-1 financing statements or UCC-3 continuation statements as may be necessary to maintain such first
priority perfected security interest shall have been filed in all appropriate filing offices;

(k)  Opinion
of O'Melveney & Myers LLP, reasonably acceptable in form and substance to the Bank and its counsel.

(l)    Payment
of the $15,000 facility fee by the Company to the Bank;

(m)  Such
other documents and instruments as the Bank may reasonably require in order to put this Amendment Agreement into full force and effect.

14

---

5.Miscellaneous.

(a)  Except
to the extent specifically amended hereby, the Loan Agreement, Loan Documents and all related documents shall remain in full force and effect. Whenever the terms
or sections amended hereby shall be referred to in the Loan Agreement, the Loan Documents or such other documents (whether directly or by incorporation into other defined terms), such defined terms
shall be deemed to refer to those terms or sections as amended by this Amendment Agreement. All references in the Loan Agreement, Loan Documents or such other documents to the Notes shall be deemed to
refer to both the Term Notes and the Equipment Note.

(b)  This
Amendment Agreement may be executed in any number of counterparts, each of which, when executed and delivered, shall be an original, but all counterparts shall
together constitute one instrument.

(c)  The
Company shall pay all reasonable expenses, including reasonable legal fees and disbursements incurred by the Bank in connection with this Amendment Agreement and the
transactions
contemplated hereby and any other expenses, reasonable legal fees and disbursements incurred by the Bank.

(d)  This
Amendment Agreement shall be governed by the laws of the Commonwealth of Massachusetts and shall be binding upon and inure to the benefit of the parties hereto and
their respective successors and assigns.

15

---

IN
WITNESS WHEREOF, the parties hereto have executed this Amendment Agreement which shall be deemed to be a sealed instrument as of the date first above written.

| |  | VERSICOR INC.      
| |  | -------------------
| |  |                    
| |  |                    
| |  | By:                
| |  |                    
| |  |                    
| |  | FLEET NATIONAL BANK
| |  |                    
| |  |                    
| |  | By:                

16

---



DISCLOSURE SCHEDULE

[To
be provided by the Company]

17

---

EXHIBIT C

COMPLIANCE CERTIFICATE

18

---

QuickLinks