One possible reason for that is the presence of an old version
of ~/.gretl2rc. Try deleting that if you haven't already.

Spon on. Now it works. I was not aware of that file affecting the build.

By the way. I have experimented a bit and I am able to build with all dependencies provided from Homebrew except GTK+(version 2.24). For some reason it does not work. Personally, I am happy now as I can build CVS Gretl so the following is just some thoughts for the future. Maybe it is worth considering if Gretl could be build with all dependencies from Homebrew and provide a brew recipe (they are really simple) because then Mac user could get Gretl just by writing "brew install gretl". Just a thought.

Best
Andreas