These merchants feature mens jeans in 40 inch inseams:

Zappos features Stetson and Cinch tall mens jeans in extra long 40 inch inseams.
Free Shipping and Free Return Shipping on all items, every day. Order several items, try them on, and return the ones you don't want -- all Free from shipping charges.

Tractor Supply

Tractor Supply Company features Wrangler 40 inch inseam tall mens jeans. Use the Size dropdown menu on the left of their page to find your size.