Long-range interactions in commensurate-incommensurate phase transition