Hello,

I attempted to cross-compile mailutils and found that it fails because
the FRIBIDI_CHARSET_CAP_RTL check uses AC_RUN_IFELSE. It seems like
this should be able to use AC_COMPILE_IFELSE instead, since it is just
checking for the existence of a preprocessor define. This would avoid
the cross-compilation problems. I have attached a patch.

Thanks, Ben
From 24562cfba38aa4b0fc813d500d46e3d4618d3e71 Mon Sep 17 00:00:00 2001
From: Ben Wolsieffer <benwolsief...@gmail.com>
Date: Thu, 12 Nov 2020 21:44:19 -0500
Subject: [PATCH] configure: don't try to run FRIBIDI_CHARSET_CAP_RTL test

AC_RUN_IFELSE is not usable when cross-compiling, and it seems like compiling
and linking should be sufficient for this test. Perhaps even linking is
unnecessary?
---
 configure.ac | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index fa5baa031..c24221518 100644
--- a/configure.ac
+++ b/configure.ac
@@ -745,9 +745,9 @@ if test "$use_fribidi" = "yes"; then
                   FRIBIDI_LIBS=-lfribidi],
                  [use_fribidi=no])
 
-    AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <fribidi/fribidi.h>],
-                                  [FriBidiCharSet s = FRIBIDI_CHARSET_CAP_RTL;])],
-                  [AC_DEFINE(HAVE_FRIBIDI_CHARSET_CAP_RTL)])
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <fribidi/fribidi.h>],
+                                      [FriBidiCharSet s = FRIBIDI_CHARSET_CAP_RTL;])],
+                      [AC_DEFINE(HAVE_FRIBIDI_CHARSET_CAP_RTL)])
                  
   else
     use_fribidi=no
-- 
2.28.0

Reply via email to