As of version 1.46, gpgrt-config only works well for the build of GnuPG and its friends, as an alternative to pkg-config plus cross build feature.
Currently:
- It works well when it is invoked by gpg-error.m4 and other *.m4 (with --libdir option)
- Or, it works well when it is invoked with PKG_CONFIG_LIBDIR or PKG_CONFIG_PATH defined
Under this restriction, it is difficult to refer gpgrt-config in a simple example of determining CFLAGS/LDFLAGS.
... because a simple invocation with no --libdir or PKG_CONFIG_LIBDIR/PKG_CONFIG_PATH is not supported yet.
(The reason why it is so is: better cross build support and avoiding code duplication of determining the place of libdir.)
Let us consider about support of a simple invocation.