# Pre-seed cache variables for tests done with AC_TRY_RUN that are not
# cross-compile friendly
C_ICAP_CONF_ENV = ac_cv_10031b_ipc_sem=yes ac_cv_fcntl=yes
+# c-icap adds '-Wl,-rpath -Wl,/usr/lib' to the link command line. This
+# causes the linker to search for libraries that are listed as NEEDED
+# in the libicapapi.so ELF header in host libraries, which breaks the
+# build. The affected library is libz. Forcing AUTORECONF adds -lz to
+# the link command line, and that makes the linker look first in
+# sysroot, thus avoiding the build breakage.
+C_ICAP_AUTORECONF = YES
ifeq ($(BR2_PACKAGE_BERKELEYDB),y)
C_ICAP_CONF_OPTS += --with-berkeleydb