The Jetsons Meet the Flintstones (1987)

Elroy Jetson invents a time machine that takes his family back to prehistoric times, where they meet the Flintstone family.