Path to this page:
Subject: CVS commit: pkgsrc/pkgtools/pkgin
From: Taylor R Campbell
Date: 2024-05-28 01:27:10
Message id: 20240527232710.E4D11FA2C@cvs.NetBSD.org
Log Message:
pkgtools/pkgin: Fix header file checks in configure.
https://github.com/NetBSDfr/pkgin/issues/133
configure.ac wrongly checks for header files in build environment
When configuring with --with-libarchive=/usr/pkg, pkgin's configure
script tests whether /usr/pkg and /usr/pkg/include/archive.h exist.
This is wrong -- it doesn't matter whether
/usr/pkg/include/archive.h exists; what matters is whether the
compiler can resolve #include <archive.h>, which it might be doing
relative to a sysroot like
/home/riastradh/netbsd/current/obj.evbarm64/destdir.evbarm.
configure.ac should use AC_CHECK_HEADER instead to check whether
#include <archive.h> works, and AC_CHECK_LIB to check whether
linking with -larchive works; similarly for libfetch, openssl, and
sqlite3. It should also provide a way to specify other arguments
than just CPPFLAGS=-I/prefix/include LDFLAGS=-L/prefix/lib
LIBS=-lwhatever, e.g. in principle some environments may need
LDFLAGS=-L/sdk/prefix/lib\ -Wl,-R/opt/prefix/lib or LIBS=-lfetch
-lssl -lcrypto.
The result of the status quo is that pkgin can't currently be
reasonably cross-compiled.
Files: