Actor Samuel L. Jackson attends the Hollywood Walk of Fame dedication for actor Christoph Waltz on December 1, 2014 in Hollywood, California

Actor Samuel L. Jackson attends the Hollywood Walk of Fame dedication for actor Christoph Waltz on December 1, 2014 in Hollywood, California

*Samuel L. Jackson says he had to stop being a vegan in hopes of gaining back enough weight to keep his job.

The actor, who had shed 40 pounds after going vegan, said producers of his upcoming film “Tarzan” were going to fire him if he didn’t gain back 20 of those pounds for his role as George Washington Williams.

Asked at what point he turned to veganism, Jackson said: ”In August 2013. Because I said I wanted to live forever. Then they threatened to fire me from the ‘Tarzan’ movie if I didn’t gain 20lbs. I’d wound up losing 40lbs. So I decided to go eat and now I’m not a vegan any more. I have protein meals two to three times a week and eat vegetarian the other four days.”

Jackson, who will next be seen in “Kingsman: The Secret Service,” didn’t think he was looking that skinny because none of his friends made mention of it.

He told Metro newspaper: ”Nobody said anything until I started to gain weight again and then they said, ‘You looked like a lollipop there!’ ”