We present an interferometer system, which is able to perform both the phase shifting interferometry and white light interferometry. The interferometer system uses a d.c. motor to control the probe position with an accuracy of 10nm, which shows an outstanding performance on white light interferometry. However, the moving mechanism of d.c. motor is not accurate enough for the phase shifting interferometry that requires a moving precision less than 1 nm. We therefore propose a Fourier transform technique to calculate the phase of interferograms, which is strongly resistant to calibration errors and external vibration. Experimental results show that the Fourier transform technique is capable of reducing the measurement error caused by inaccurate movement within 0.1nm.