Problems installing Dynare from source MacOS Ventura (M2 chip) Matlab 2022a

Dears,
After having followed carefully the instructions in Dynare / dynare · GitLab, I am having issues with ./configure.
It seems I have a problem with the C compiler. I attach the config.log for completeness.
If someone could help me, I would appreciate it a lot.
Thank you in advance.
config.log (9.0 KB)

Do you have gcc12 installed?

I had it but I needed to :
brew link --overwrite gcc

When I do dynare_config in Matlab I get:

Warning: Name is nonexistent or not a directory:
/Users/Massimo/git/dynarenew/unstable/matlab/…/mex/matlab

In path (line 109)
In addpath (line 86)
In dynare_config (line 133)
Warning: X13 binary is not available.
If you are under Debian or Ubuntu, you can install it through your package manager,
with ‘apt install x13as’.
If you are under Windows or macOS, this probably means that you did not install the
dseries toolbox through an official package.

In select_x13_binary (line 68)
In initialize_dseries_class (line 110)
In dynare_config (line 136)

although I followed the instructions to install X13…

Dears, I had overlooked the last paragraph of the instructions referring to the Matlab path.
Now everything works correctly.

Thanks