Digital Holographic Microscopy (DHM) is a powerful imaging technique allowing, from a single amplitude image acquisition (hologram), the reconstruction of the entire complex wave front (amplitude and phase), reflected by or transmitted through an object. Because holography is an interferometric technique, the reconstructed phase leads to a sub-wavelength axial accuracy (below A/100). Nevertheless, this accuracy is difficult to obtain from a single hologram. Indeed, the reconstruction process consisting to process the hologram with a digital reference wave (similar to classical holographic reconstruction) seems to need a-priori knowledge about the physical values of the setup. Furthermore, the introduction of a microscope objective (MO), used to improve the lateral resolution, introduces a wave front curvature in the object wave front. Finally, the optics of the set-up can introduce different aberrations that decrease the quality and the accuracy of the phase images. We propose here an automatic procedure allowing the adjustment of the physical values and the compensation for the phase aberrations. The method is based on the extraction of reconstructed phase values, along line profiles, located on or around the sample, in assumed to be fiat area, and which serve as reference surfaces. The phase reconstruction parameters are then automatically adjusted by applying curve-fitting procedures on the extracted phase profiles. An example of a mirror and a USAF test target recorded with high order aberrations (introduced by a thick tilted plate placed in the set-up) shows that our procedure reduces the phase standard deviation from 45 degrees to 5 degrees.