Use libetpan CFLAGS for header check
authorJonathan Boeing <jonathan@claws-mail.org>
Mon, 28 Nov 2022 01:47:38 +0000 (18:47 -0700)
committerJonathan Boeing <jonathan@claws-mail.org>
Mon, 28 Nov 2022 05:25:35 +0000 (22:25 -0700)
configure.ac

index 317d6fa0de196717902652bd31d5ff98da8f3d31..0e60ece2dfd6baaea139184267fef793d75ac2ae 100644 (file)
@@ -976,13 +976,18 @@ if test x"$enable_libetpan" = xyes; then
         fi
     ])
     if test "x$libetpan_config" = "xyes"; then
+        libetpan_save_CPPFLAGS=$CPPFLAGS
+        CPPFLAGS="$CPPFLAGS $LIBETPAN_CFLAGS"
         AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
         if test "x$libetpan_result" = "xyes"; then
             AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
+            libetpan_save_LIBS=$LIBS
             LIBS="$LIBS $LIBETPAN_LIBS"
             AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <libetpan/dbstorage.h>]], [[db_mailstorage_init(NULL, NULL);]])],[libetpan_result=yes],[libetpan_result=no])
+            LIBS=$libetpan_save_LIBS
             AC_MSG_RESULT([$libetpan_result])
         fi
+        CPPFLAGS=$libetpan_save_CPPFLAGS
     fi
     if test "x$libetpan_result" = "xyes"; then
         if test $libetpan_versiontype -eq 1; then