Typically, analog function generators use a
triangle VCO. This is easy: use two voltage-controlled current sources, one to charge, and the other to discharge, a capacitor. A comparator with hysteresis steers the current, with the help of a diode bridge, to select between charge and discharge, and the capacitor will then give a triangle waveform with a frequency that is a function of the capacitance and the current source control voltage.
This video by Alan Wolke is a good tutorial on this method:
Once you have a triangle wave,
National Semiconductor AN-263 has two circuits to convert that to sine. Just Ctrl-F and search for "breakpoint shaper" and "logarithmic shaping".
The square wave can obviously be derived directly from the comparator output.
If you don't need a triangle, you can of course use a true sine VCO and use a comparator to get a square from that. I think that app note should have some things of interest to you if you want to follow that route as well.
Up near 1 MHz, the distortion on the triangle wave caused by the capacitance of the diode bridge does become a bit tricky to manage, so if you don't need a triangle output, you might consider the pure sine route. That might get you a lower-distortion sine wave, as well.