I've been struggling with the same thing lately. The solutions mentioned so far would work well if the other person brought it up directly, but how does one deal with more subtle signs of interest?
For example: The friend introduces you to one of their friends, who says, in front of a bunch of people "Oh, I've heard about you! You're lucky to be here with [name of friend]. S/he'll treat you well!", or when the person showers you with compliments and then acts all mopey and rejected when you make plans to hang out but have to back out at the last minute because something else came up.
In cases like these, it would be awkward to bring it up because if they're actually not that interested, or choose to deny it, you'd seem like a narcissist. But if you don't do anything about it, you're guilty of leading them on. I also worry that if I reject them too strongly, they'll be really hurt, and won't want to be friends anymore. Or if I don't reject them clearly enough, they'll want to remain friends only because they're clinging to a false hope of it developing into something more.
Sometimes I get so nervous about stuff like this, I just stop talking to the person, which obviously isn't very nice either.