Segel will play David Foster Wallace, the author of “Infinite Jest” who committed suicide in 2008, while Eisenberg will play Rolling Stone reporter David Lipsky.

James Ponsoldt (“The Spectacular Now”) will direct from a script by playwright Donald Margulies, who adapted Lipsky’s book “Although Of Course You End Up Becoming Yourself: A Road Trip With David Foster Wallace. Coincidentally, Ponsoldt used to work at Rolling Stone while he was in college.

Story finds Lipsky accompanying Wallace across the country on a book tour promoting “Infinite Jest,” just as Wallace starts to become famous. Along the way, jealousy and competition bubbles up between the two writers as they discuss women, depression and the pros and cons of fame.

David Kanter and Matt DeRoss will produce for Anonymous Content along with James Dahl of Modern Man Films. Anonymous Content’s Paul Green will executive produce the film, which is tentatively scheduled to start production in February/March.

Eisenberg, who is coming off the box office hit “Now You See Me,” will soon be seen in Kelly Reichardt’s “Night Moves” and Richard Ayoade’s “The Double.” He’s set to star opposite Kristen Stewart in PalmStar and Likely Story’s action comedy “American Ultra,” which is scheduled to start production in April. He’s repped by CAA and attorney Patti Felker.