I'm installing into /var/tmp for testing. I've built and installed libgpg-error 1.35:
$ ls /var/tmp/lib64/ charset.alias libgpg-error.la libiconv.so.2.6.0 libbz2.a libgpg-error.so libz.a libcharset.a libgpg-error.so.0 libz.so libcharset.la libgpg-error.so.0.26.1 libz.so.1 libcharset.so libiconv.la libz.so.1.2.11 libcharset.so.1 libiconv.so pkgconfig libcharset.so.1.0.0 libiconv.so.2 preloadable_libiconv.so
And:
$ ls /var/tmp/lib64/pkgconfig/ gpg-error.pc zlib.pc
However, when I try to configure libgcrypt, it ends with:
checking for gpg-error-config... no checking for GPG Error - version >= 1.25... no configure: error: libgpg-error is needed. See ftp://ftp.gnupg.org/gcrypt/libgpg-error/ .
Here are the variables used for libgcrypt configure. They are the same variables used for libgpg-error.
PKGCONFPATH: /var/tmp/lib64/pkgconfig CPPFLAGS: -I/var/tmp/include -DNDEBUG CFLAGS: -g2 -O2 -march=native -fPIC CXXFLAGS: -g2 -O2 -march=native -fPIC LDFLAGS: -L/var/tmp/lib64 -Wl,-R,/var/tmp/lib64 -Wl,--enable-new-dtags LDLIBS: -ldl -lpthread
Here is the full configure for libgcrypt: :