I also mentioned some weirdness about `AM_LDFLAGS` in [the PR](https://github.com/LarsGit223/geany-plugins/pull/1) I made for [the other/first](https://github.com/geany/geany-plugins/pull/620) PR for this, but it's mysteriously missing now. I think it was that it cannot be used by anything but plugins since it puts libtool `-module -avoid-version` flags in there. That is why [the Makefile.am explicitly uses `GP_LDFLAGS`](https://github.com/geany/geany-plugins/pull/622/commits/1f6923e012aa26fd95fc...) instead of implicitly inheriting the `AM_LDFLAGS`.
Also, I left [a TODO](1f6923e012aa26fd95fc3f3cabd66e2b7d32ee20#diff-4bf485625e498fde51df9a8ce1925c08R4) in the .m4 template that might be nice to fix.