From b6f16843598be062e4cfc448b38be8dfd2e4501d Mon Sep 17 00:00:00 2001 From: Martin Pulec Date: Wed, 8 Nov 2023 15:05:19 +0100 Subject: [PATCH] fixed new zfec still crashing in Win imroves 2af4ace25 fix, which didn't work for Windows, since the compiler here doesn't accept include with absolute path: ``` tst.c:4:10: fatal error: '/usr/local/src/zfec/fec.h' file not found 4 | #include "/usr/local/src/zfec/fec.h" | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated. ``` (neither <> syntax works) --- configure.ac | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 4df951ccd..5b2cf4caa 100644 --- a/configure.ac +++ b/configure.ac @@ -2685,13 +2685,16 @@ if test $cross_compile = no; then AC_CHECK_FILES([$ZFEC_PREFIX/fec.c $ZFEC_PREFIX/fec.h], [found_zfec=yes]) fi if test "$found_zfec" = yes; then - AC_MSG_CHECKING([fec_init declaration in $ZFEC_PREFIX/fec.h]) + S_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -I$ZFEC_PREFIX" + AC_MSG_CHECKING([fec_init declaration in fec.h]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ - #include "$ZFEC_PREFIX/fec.h" + #include "fec.h" ]], [[ #pragma GCC diagnostic error "-Wimplicit-function-declaration" fec_init();]])], fec_init=yes, fec_init=no) + CFLAGS=$S_CFLAGS if test "$fec_init" = yes; then AC_DEFINE([HAVE_FEC_INIT], [1], [fec_init must be called before fec_new]) fi