gnutls.pc assumes user will link using libtool, but doc claims you don't need libtool to link
It's nice that gnutls installs a pkg-config file, gnutls.pc.
http://www.gnutls.org/manual/gnutls.html#Building-the-source even explains how to use it: to link, just grab link flags from pkg-config and pass them straight to your gcc link command.
When I try that, the build fails gnutls.pc contains something like
Libs.private: -lz -L/opt/foo/lib -lintl -liconv -lc -R/opt/foo/lib -lgmp
-R is not a compiler option; it's a libtool option (well, and a linker option, too, with synonym -rpath).
I think the problem is that lib/gnutls.pc.in contains
Libs.private: @LTLIBZ@ @LTLIBINTL@ @LIBSOCKET@ @LTLIBPTHREAD@ @LTLIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@
If it contained
Libs.private: @libz@ @LIBINTL@ @LIBSOCKET@ @LIBPTHREAD@ @LIBICONV@ @P11_KIT_LIBS@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@
the offending -R would not occur.
I always thought pkg-config and libtool were competing solutions to recursive dependencies; users of pkg-config pass the options they get from it straight to the linker, not to libtool; thus one should not use libtool flags inside a pkg-config .pc file. I was chagrined to learn that gnome puts .la filenames inside .pc files, and requires libtool to link. So there's some lack of consensus on the issue.
But given that the doc specifies that libtool is not needed, perhaps gnutls should remove the LT prefixes from gnutls.pc.in and make sure that works as the doc specifies.