Forty years ago Mel Brooks’ “Blazing Saddles” pushed the envelope with his Western spoof “Blazing Saddles,” which put flatulence center-stage in one memorable sequence and played with PC concerns in its basic storyline. Now Seth MacFarlane takes whatever might be left of the envelope and completely shreds it, stuffing his Wild West farce—presumably intended as a kind of homage of Brooks—with so many scatological gags, drug jokes and explicit sexual gross-outs—and such frequent occurrences of the “F” bomb—that it has little room for anything else, including challenges to PC norms, which are surprisingly few and limp when they do show up. He does, however, retain space for periodic explosions of supposedly comic violence, which are so tonally jarring that they’re likely to repulse rather than amuse. The sight of a man having his head crushed by a falling block of ice isn’t a gut-buster.

Presumably such bloody moments are required to justify the title, which has to do with the oft-expressed conviction of Albert Stark (MacFarlane)—the peace-loving sheepherder trying to survive in Old Stump, a dismal little town in 1882 Arizona—that the West is entirely too deadly. Threatened with fatal retribution from a neighboring rancher who claims his sheep ruined his grazing land, Albert buys off the fellow rather than going through with a gunfight, which leads his long-time girlfriend Louise (Amanda Seyfried) to dump him for preening local moustache tycoon Foy (Neil Patrick Harris).

Albert is saved from his numbing gloom over this turn of events by the arrival of Anna (Charlize Theron), a cowgirl who happily poses as his new girlfriend, using her myriad talents to outfox both Louise and Foy and instructing Stark how to shoot in preparation for a duel with the moustache king. But their incipient romance proves dangerous, because Anna is actually the wife of notorious outlaw Clinch Leatherwood (Liam Neeson), who comes to town looking to kill the man who kissed his wife. That leads to a final show-down in which Albert’s drug-heavy encounter with Cochise (Wes Studi) plays a decisive role.

Folded into this storyline is a parallel plot involving Albert’s best friend Edward (Giovanni Ribisi), whose devotion to his girlfriend Ruth (Sarah Silverman) is unfazed by the fact that she’s a heavy-duty employee of the local bordello even while insisting that she and Edward should refrain from doing what she does with every other man in sight to “save” themselves, in true Christian fashion, until they’re married.

One suspects that this ghastly subplot, which repeatedly embarrasses both Ribisi and Silverman along with us, is intended to divert attention from the central narrative, which is quite bad enough, a jumble of puerile sketches delivered at a plodding pace. The problem is threefold: the script, which MacFarlane and his two co-writers cobbled together without much cleverness or sense of structure (in fact, the best joke, involving a still of a stern-looking woman, comes within the first minute or so, and it’s all downhill from there); MacFarland’s tepid direction, which allows things to mosey along lethargically, not even coming to life in the fight or dance sequences; and his bland performance, which consists mainly of moving stiffly, staring blankly toward the camera with a deer-in-the-headlights look, and delivering his lines like a stand-up comic reciting canned jokes. (He should have remembered that Brooks’s best movies were ones in which he didn’t star himself.)

What verve the movie has, performance-wise, comes from Theron, who isn’t given much to do but does it with charm and enthusiasm. By contrast Harris, who’s usually so reliable, manages little more than a generalized sneering villainy (and must deliver some terrible puns, along with enduring a gun-fight scene that devolves into excruciating vulgarity), and Neeson growls and scowls in his customary fashion, but gets a similarly gruesome moment after he’s been conked out by Anna. No one else in the cast is particularly memorable, at least not in a way they’d care to have mentioned. The many unbilled cameos, some of which are witless references to other, better movies (e.g., “Back to the Future” and “Django Unchained”), would work better if the good-natured performers had been given any decent material to work with, though it’s hard to imagine that even Shakespeare could have come up with anything that might save Gilbert Gottfried’s impersonation of Abe Lincoln.

There’s some compensation in Michael Barrett’s cinematography, which gives color and vibrancy to the Monument Valley locations, and the music by Joel McNeely, who’s restored and conducted a goodly number of classic scores for disc and certainly knows his way around the tropes used in those for westerns, from Elmer Bernstein’s “The Magnificent Seven” on. The other technical contributions are of generally high quality as well, but pretty packaging can’t make up for emptiness within.

One can detect bits and pieces of many old Westerns in MacFarlane’s oater, with “Destry” and “The Sheepman” leading the pack. But the unfortunate result of his effort can be described by alluding to another classic flick, this one by Sergio Leone. There’s not much that’s good in it, plenty that’s bad, and an awful lot that’s just plain ugly.