19th-century Austrian emperor embroiled in scandal agrees to a political marriage for his nation's sake.