Tim Rühsen tim.ruehsen@gmx.de writes:
When installed to a custom location, you have to set PKG_CONFIG_PATH correctly. And the configure.ac code for nettle should be something like (taken from wget2): PKG_CHECK_MODULES([NETTLE], nettle, [ with_libnettle=yes LIBS="$NETTLE_LIBS $LIBS" CFLAGS="$NETTLE_CFLAGS $CFLAGS" AC_DEFINE([WITH_LIBNETTLE], [1], [Use libnettle]) ], [ with_libnettle=no AC_MSG_WARN(*** LIBNETTLE was not found. Fallback to libgcrypt for hashing and checksumming.) ])
*BUT* I had some issues with just setting PKG_CONFIG_PATH alone on Debian unstable a while ago. I had to adjust to something different.
This is the failure I got when setting PKG_CONFIG_PATH but not CPPFLAGS: https://gitlab.com/gnutls/nettle/-/jobs/494919451
In file included from iov.c:26: ../lib/gnutls_int.h:56:10: fatal error: nettle/memxor.h: No such file or directory 56 | #include <nettle/memxor.h> | ^~~~~~~~~~~~~~~~~ compilation terminated.
So either gnutls doesn't use pkg-config include flags, or there's something wrong with nettle's .pc files. I can't investigate that right now.
- What's the right way to add line breaks for the very long configure command in .gitlab-ci.yml?
Just breaking the line (linefeed) is enough, as long as the continuation line doesn't start with a dash '-'.
I see, thanks.
Regards, /Niels