Okay, so abortion ought to be legal until the point that the fetus can survive outside the womb with whatever medical technology is available.
One argument against that as being the rule is that viability isn't really all that relevant to our intuitions (I first read it in Tooley's "Abortion and Infanticide" I think, but I'm not sure). Consider the following situation. A fetus is somehow miraculously conscious and communicative but not viable. The argument says that no one would really consider viability as the determining factor. Any conscious, intelligent and communicative (so we know he's conscious) being surely has a right to life regardless of whether it is viable or not.
Now, obviously it is a fantastic thought experiment, but I think I agree that I wouldn't regard viability of an undeniably intelligent being the determining factor for rights to life. This doesn't mean that the right to life necessarily entails that aborting this fantasy fetus would be wrong. Maybe that right is outweighed by other concerns, but the right must be figured into the moral reasoning.
Thus, viability by itself can't be the source of the right to life. (Tooley takes the radical position that infanticide is not morally wrong because the infant doesn't have a right to life either, but his argument requires more writing than anyone here probably cares to read and need not distract us.)