libgimp: fix GObject-Introspection build in autotools.

Merged Jehan requested to merge wip/Jehan/fixing-gir-or-not into master

Both @akkana and I had a failure of GimpUi GIR build with autotools, with this error:

/usr/bin/ld: ../libgimp/.libs/ undefined reference to `gimp_check_custom_color2'

I am not sure that the fix is right, and the worst part is that once we fixed the build with this commit, then if we revert it, the build still works (even after a make clean or git clean -dfx, or wiping the prefix or build dir). So since nobody else reported the issue, and because the CI worked fine without this fix (and CI uses pristine machines), the problem was probably somewhere in our build environments.

This is why I don't push this to the repo. I'll keep it here for some time, and see if anyone else reports the same issue (then we may try to understand again and think if it's worth pushing). If it doesn't happen, then I'll just close this MR after some time.

Edited by Jehan

Merge request reports