]> Savannah Git Hosting - gnulib.git/commitdiff
iconv: Define a summary result.
authorBruno Haible <bruno@clisp.org>
Sun, 10 Jul 2022 15:30:28 +0000 (17:30 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 10 Jul 2022 15:30:28 +0000 (17:30 +0200)
Reported by Simon Josefsson in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.

* m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.

ChangeLog
m4/iconv.m4

index 21c9451313fed9f391666df450e31d4f91573471..adbed1d8713cb2aab00689c1edbc254059d0c09d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2022-07-10  Bruno Haible  <bruno@clisp.org>
+
+       iconv: Define a summary result.
+       Reported by Simon Josefsson in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-07/msg00020.html>.
+       * m4/iconv.m4 (AM_ICONV): Define also am_cv_func_iconv_summary.
+
 2022-07-10  Bruno Haible  <bruno@clisp.org>
 
        iconv: Remove obsolete comment.
index 6f1ae2b13d7274747733ac37d3cf3e5734de649c..2065c9772ad88bf14fbd0426795625134b41e80b 100644 (file)
@@ -1,4 +1,4 @@
-# iconv.m4 serial 25
+# iconv.m4 serial 26
 dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -274,4 +274,20 @@ size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, si
        ICONV_CONST="const"
      fi
     ])
+
+  dnl A summary result, for those packages which want to print a summary at the
+  dnl end of the configuration.
+  if test "$am_func_iconv" = yes; then
+    if test -n "$LIBICONV"; then
+      am_cv_func_iconv_summary='yes, in libiconv'
+    else
+      am_cv_func_iconv_summary='yes, in libc'
+    fi
+  else
+    if test "$am_cv_func_iconv" = yes; then
+      am_cv_func_iconv_summary='not working, consider installing GNU libiconv'
+    else
+      am_cv_func_iconv_summary='no, consider installing GNU libiconv'
+    fi
+  fi
 ])