Since you seem to be in haste, why not use the pre-built packages as documented above? Or the ISO as documented here: https://github.com/pyzahl/Gxsm3? To install the missing packages on Ubuntu, you can consult the control file: https://raw.githubusercontent.com/pyzahl/Gxsm3/master/debian/control_ubuntu22.04
Let us know if the instructions by Thorsten did the job for you. I have tried to follow my old recipes for Debian and I found that they no longer work. It seems that quite a few libraries were renamed beyond recognition or version detection does not work properly... I had suggested a few times to migrate to a more mdern build-framework, but @zahl seems to be happy with the autotools. There is a post from 2012, when I had build Gxsm successfully with Cmake, but I never pushed this proof-of-concept...
i'd recommend ubuntu, as it has the newer libraries usually. @zahl Do you keep the installation instructions in the Manual up to date? If not, I'd volunteer to update them for Bullseye.
I'll be there if timezone permits.
Whenever I was having trouble with the dconf configuration, I simply created a new user on the system (e.g. gxsm1, gxsm2, gxsm3, etc) to make sure that there are no side-effects from dconf or any other configuration. Sound brutal, but works. This also allowed me to keep different branches of configurations without much hassle. (of course assuming that you have root).
I used to have a similar script, located here, but not updated in a while. https://github.com/StefanSchroeder/gxsm-snippets
Marco, please note that you can also use Vi instead of Emacs for writing your code. See https://en.wikipedia.org/wiki/Editor_war for details.
Please post the configure/compile logs.