First off, it's worth noting that it's time to link to the SRD:
Second - you first need to put yourself in a very specific frame of mind: In Pathfinder, Good and Evil as system terms are not relative terms. They are Absolute. They are also forces of nature. And so when you read those paragraphs stating what is 'good' and 'evil', you have to remember that they're being quite specific. This isn't a matter of navel-gazing or philosophy - it's a matter of Science.
Good/evil, at its core, involves your attitude towards life and quality of life.
Law/chaos, at its core, involves your attitude towards doing things The Right Way, and how you think of authority.
Third: Some common pitfalls in looking at alignment.
Theft is NOT an evil act. It is a chaotic act.
Law is a universal constant. There are mortal laws which are NOT Lawful. Lawful characters put universal Lawfullness first - that involves a respect for mortal authority, and obedience, but only inasmuch as it does not contradict or detract from Absolute Lawfulness. Perfect obedience to a mortal law that contradicts Absolute Law is not inherently lawful.
Fourth: The easy answer
The simplest way to answer a 'morally ambiguous character' is "Neutral." Only those dedicated to one side or the other are good/evil, lawful/chaotic. Those who flip-flop between the two sides, or are not dedicated to one or the other, are neutral - and given the normal state of most people 'not caring', I'd say that the majority of the world's pretty darn neutral.
Fifth: A more complex 'how to'.
So you have a complex character. Start making a list of their attributes, broken down as simply as you can, based on the following list of focuses:
How do they react to the life and quality of life for individuals?
How do they react to the life and quality of life for groups?
Are their inner motivations towards saving life? Towards destroying life?
What is their automatic reaction when approached by an authority figure?
Do they try to obey innocuous local laws, or do they just not care?
Do they want to create a neat and orderly society, or do they want to create a society where everyone does whatever they want?
List out the points (and weight them if you like) and then consider how they weigh up against each other.
Sixth: An example for the complex 'how to'.
Let's take your king there. Now, I don't really think there's enough information to actually make a decision - but I'll do what I can.
* He gives to good churches. NOTE: This very statement means the churches are GOOD on a universal scale - they make an active role in improving the life and quality of life of those around them. So this means the king makes an active effort to save life and improve quality of life.
The 'weighted' part comes in, though, in how much he means it. Does he really try to be good, but has a lot of flaws? Then this should weight heavily. Does he do it as a cover for his true nature, so he can appear good and game the system? Then the weight is 'zero' and it gets negated.
He speaks about good deeds and morals. He tries to encourage goodly activity in the world.
The 'weighted' part comes in when you consider why. Is it because he's trying to encourage good activity in society, so that people are better off? Then this is weighted stronger. Is it because he wants to make people think he's good, but doesn't mean what he says? then the weight is 'zero'.
He is power hungry.
This may or may not be good/evil. What does he DO to support this power hunger? Does he kill his enemies? Or does he just scheme and twist and make all sorts of pacts and alliances? The only thing which matters to 'good' vs 'evil' is what his motivations towards the life of others is. Does he seek ridiculous levels of power because he thinks that if he doesn't, more people will get hurt and die?
- He uses facades / he lies a lot. This is chaotic.
- He associates with people he knows lie a lot. This is chaotic.
- He is greedy and power hungry.
This may or may not be lawful/chaotic. What does he DO to support this power hunger? Does he cheat, steal, blackmail, and scheme? Or does he do everything through loopholes and legalese?
Greed and power-hungriness aren't really a good/evil thing, nor a lawful/chaotic thing. They can exist on any side of the spectrum. So it's not a matter of whether or not he craves power - it's HOW he goes about it, and WHY.
Now, after weighting all this stuff, let's say you got:
Good/evil: 6/2: He's probably a pretty good character who makes some difficult choices in the search for the greater good.
Good/evil: 3/2: He's a neutral character who doesn't care about life one way or the other, but he sure likes looking good for the crowds.
Good/evil: 2/6: He's a loathsome but charismatic villain whose hands are stained with blood, but knows how to put on a good show and seem angelic.
Law/chaos: 5/3: He's very interested in doing things the right way, but darn it, sometimes people just need a break as long as they're generally trying to do things right. Everyone has a few foibles, right?
Law/chaos: 2/3: He's just trying to get things done - he'll do it in the law if he has to, but ... heck, everyone cheats, he's gotta cheat just to keep up, right?
Law/chaos: 2/7: Pffft. Laws are for suckers. He's the king, he doesn't have to follow the law. As long as he's popular, he can get away with whatever he wants.