It's a difficult situation...but you hear the saying "Best to have loved and lost than not having loved at all". Something along that line....hmm sorry i'm waffling....it usually gets to the point that you can't take it anymore and that you will have to tell him your feelings, of course, easier said than done, but you reach breaking point at some point down the line...if he's a real, true friend, you're friendship should not be over if he isn't interested , he should take being asked out by you...as being flattering...and nothing else but. It may make things odd for a while after, uneasy but if you are friends, maybe you can somehow laugh off/away the pain....
I was in this situation two years back - at the time i thought it was love with a girl my age in first year at university - took me 3-4 weeks to conjure up the courage to ask her out....and she said no, i'd forgotten that she'd mentioned she had a love interest with someone else back home...so i c ocked that one up.
With you, you seem certain that he doesn't have any interest in you of the kind you have in him? The difference with me, is that i thought i was seeing interest emanating from this girl, i heard comments she made about me, comments i wasn't supposed to hear, and generally she was/is just a goddess in every way. Just don't change yourself, be yourself around him as other posters have advised...sorry for rambling.