[PATCH] Add wc-funcs warnings to configure.

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <[email protected]>
If --without-wc-funcs is explicitly provided, a warning that the
option will be removed is printed.

If, instead, the check for needed wc-funcs fails, a different warning
is printed, warning that the system may no longer be able to compile
mutt starting with 2.5.0.
---
THIS PATCH IS UP FOR DISCUSSION.  Please comment!

My thinking is that we can continue to provide the wcwidth() backup, but
the other functions being missing will trigger a configure failure
starting in 2.5.0.

 configure.ac | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/configure.ac b/configure.ac
index 33d483d2..2378b4a7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1550,6 +1550,10 @@ wc_funcs=maybe
 AC_ARG_WITH(wc-funcs, AS_HELP_STRING([--without-wc-funcs],[Do not use the system's wchar_t functions]),
         wc_funcs=$withval)
 
+if test "$wc_funcs" = no; then
+        AC_MSG_WARN([--without-wc-funcs is deprecated and will be removed in mutt 2.5.0])
+fi
+
 if test "$wc_funcs" != yes && test "$wc_funcs" != no; then
         AC_CACHE_CHECK([for wchar_t functions], mutt_cv_wc_funcs,
                 mutt_cv_wc_funcs=no
@@ -1565,6 +1569,9 @@ if test "$wc_funcs" != yes && test "$wc_funcs" != no; then
 #endif]], [[mbrtowc(0, 0, 0, 0); wctomb(0, 0); wcwidth(0); iswblank(0);
         iswprint(0); iswspace(0); towlower(0); towupper(0); iswalnum(0)]])],[mutt_cv_wc_funcs=yes],[]))
         wc_funcs=$mutt_cv_wc_funcs
+        if test "$wc_funcs" = no; then
+           AC_MSG_WARN([This system is missing needed wchar_t functions. Starting with mutt 2.5.0 this system may no longer be able to compile mutt.])
+        fi
 fi
 
 if test $wc_funcs = yes; then
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.