The Jetsons Meet the Flintstones (1987)

Elroy Jetson invents a time machine that takes him back to prehistoric times, where he meets the Flintstone family.