For 'normal' lions (which luckily are the majority and are not by nature man-eaters) the best thing is to stay calm, and to walk away confidently while keeping your wits about you. Any sign of weakness or fear (eg running, crying etc) will most likely trigger a predatory response and you will be rended to smithereens in no time flat!
A good example is during tours in national parks when families go in the vans .....and every now and then you have the occasional child who sees the lions laying on the ground in the Savannah and for (whatever reason) starts to cry. The reaction elicited by the lions is amazing ....in that before the kid starts to cry they are placid and lazily slumbering ...but the moment they hear the cries their ears prick up and they start looking around for its source ....because to them a cry signifies something weak (or sick, or injured) and hence an easy meal! In one case (one of the South African cases where refugees try to illegally immigrate) a mother and her two daughters tried to enter by sneaking through the national park at night, and encountered a pride of lions. The mom, being a mother i guess, rushed the lions waving her arms trying to 'scare' them away. Immediately a lioness pounced on her and ripped her apart in front of her daughters. At that point one of the daughters started to cry (seeing your mom devoured in seconds has a strong tendency of making someone cry) ....and another lioness made short work of her. The onyl survivor was the girl who in total silence (due to the pure unabated shock of the incident that took away her ability to make any sound) crawled away and was picked up the next day by a tourist van.
By the way one thign i have noticed is that tourists see lions during the day sleeping around looking like big fat lazy cats and they assume they are 'sweet' and docile. Some try to get out of the car ...thinking the lions will lick their palms or something. Bad move.
3 years ago an American tourist was killed when he snuck out of his game lodge, and pitched camp in the middle of the game park (using a pup tent). He wanted to 'experience nature first hand' and consequently they found his remains the next morning. Unknown to him the 'playful' lions he had encountered during the day become Africa's apex predator at night, and the act of pitching his tent had attracted a pride of lions ....and he must have done something that prompted them to attack (maybe trying to pitch a tent in the freaking dark in a game reserve). It was a sad incident (however the dude's sanity was questionable)!
To defeat a cat, one must think like a cat.
Based on observations of my daughter's former pet, my answer would have to be: if you sight one while unarmed, close your eyes.
Apparently, she quite sucessfully made us disappear when receiving a scolding by sitting while facing us and closing her eyes for minutes on end.
Surely it works both ways.