The crossover from a ferroelectric to a relaxor state in lead-free solid solutions