172f97a2dSAlex Richardson# These defines are needed for both libarchive and the tests. If we don't keep 272f97a2dSAlex Richardson# them in sync we can get run-time crashes while running tests due to mismatches 372f97a2dSAlex Richardson# between structures such as archive_md5_ctx, etc. 472f97a2dSAlex Richardson 572f97a2dSAlex RichardsonLIBADD= z bz2 lzma bsdxml zstd 67f815d4fSMartin MatuskaCFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1 \ 7*a25e0ba5SBaptiste Daroussin -DHAVE_ZSTD_H=1 -DHAVE_LIBZSTD=1 -DHAVE_ZSTD_compressStream=1 \ 8*a25e0ba5SBaptiste Daroussin -DHAVE_SYSCONF=1 972f97a2dSAlex RichardsonCFLAGS+= -DPLATFORM_CONFIG_H=\"${.CURDIR}/config_freebsd.h\" 1072f97a2dSAlex Richardson 1172f97a2dSAlex Richardson.if ${MK_OPENSSL} != "no" 1272f97a2dSAlex RichardsonCFLAGS+= -DWITH_OPENSSL 135a7500daSPierre ProncheryCFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L 1472f97a2dSAlex RichardsonLIBADD+= crypto 15e23d4518SPierre ProncheryCFLAGS.archive_hmac.c+=-Wno-error=cast-qual 1672f97a2dSAlex Richardson.else 1772f97a2dSAlex RichardsonLIBADD+= md 1872f97a2dSAlex Richardson.endif 1972f97a2dSAlex Richardson 2072f97a2dSAlex Richardson.if ${MK_ICONV} != "no" 2172f97a2dSAlex Richardson# TODO: This can be changed back to CFLAGS once iconv works correctly 2272f97a2dSAlex Richardson# with statically linked binaries. 2372f97a2dSAlex RichardsonSHARED_CFLAGS+= -DHAVE_ICONV=1 -DHAVE_ICONV_H=1 -DICONV_CONST= 2472f97a2dSAlex Richardson.endif 25