A general algorithm for synthesizing purely real correlation filters in the frequency domain is developed using the method of Lagrange multipliers. This method can be applied to filters which can be derived using linearly constrained quadratic minimization. Purely real minimum average correlation energy (MACE) filters are synthesized to illustrate our approach. Their performance is found to be comparable to original complex MACE filters. The main advantage of our approach is the generation of purely real filters which can be easily implemented in spatial light modulators without holograms and yield the correlation output on the zero-order beam.