configurepkg-configgnutlsnettle

configure GnuTLS - libnettle 3.4.1 was not found - OS X Lion


I'm trying to build GnuTLS-3.x on my OS X Lion and here is my configure command:

./configure --prefix=/usr/local/gnutls-3.4.9 --with-included-libtasn1 --without-p11-kit

It ends up

checking for NETTLE... no
configure: error:
  ***
  *** Libnettle 3.4.1 was not found.

though libnettle-3.4.1 is installed under /usr/local/libnettle-3.4.1 and its pkg-config file libnettle.pc is defined under /usr/local/lib/pkgconfig (I've built nettle-4.3.1 from source successfully)

I've read the stackoverflow post GnuTLS Libnettle 3.4 was not found but it didn't help a bit. All other posts on the Internet didn't help either.

I'm stuck on this error. Any help is appreciated. Thanks.


Solution

  • I've found the cause of the problem. It was the incorrectly defined environment variable PKG_CONFIG. It was set just to the installation directory of the pkg-config i.e. /usr/local/pkg-config-0.28

    However it looks like that it must have been set to the full path plus the pkg-config command itself, like: /usr/local/pkg-config-0.28/bin/pkg-config