summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2005-08-08 19:50:38 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2005-08-08 19:50:38 +0000
commit717f3d4abbe99467f07b05462d7651b08e69dd20 (patch)
tree3b81ed49b4bd4e0f01fe98d9f3d996e49c8ccc2b /configure.in
parent81b6a73938f881fb15f995a7837f0654e08941b0 (diff)
Enable the endianness test.
2005-08-08 Matthias Clasen <mclasen@redhat.com> * tests/convert-test.c: Enable the endianness test. * glib/gconvert.c: Make the caching of iconv descriptors optional. * configure.in: Add an --enable-iconv-cache option, and default to disabling iconv caching on new enough glibc. Somebody with access to Solaris systems will need to test if opening/closing of iconv descriptors is enough of a performance problem to warrant the caching on that platform. Note that the caching is causing correctness problems in some corner cases, thus turning it off is desirable unless it has severe performance implications.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in28
1 files changed, 28 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 77086e11a..e79e87330 100644
--- a/configure.in
+++ b/configure.in
@@ -396,6 +396,34 @@ if test "x$found_iconv" = "xno" ; then
AC_MSG_ERROR([*** No iconv() implementation found in C library or libiconv])
fi
+jm_GLIBC21
+AC_ARG_ENABLE(iconv-cache,
+ [AC_HELP_STRING([--enable-iconv-cache=@<:@yes/no/auto@:>@],
+ [cache iconv descriptors [default=auto]])],,
+ [enable_iconv_cache=auto])
+
+AC_MSG_CHECKING([Whether to cache iconv descriptors])
+case $enable_iconv_cache in
+ auto)
+ if test $ac_cv_gnu_library_2_1 = yes; then
+ enable_iconv_cache=no
+ else
+ enable_iconv_cache=yes
+ fi
+ ;;
+ yes|no)
+ ;;
+ *) AC_MSG_ERROR([Value given to --enable-iconv-cache must be one of yes, no or auto])
+ ;;
+esac
+
+if test $enable_iconv_cache = yes; then
+ AC_DEFINE(NEED_ICONV_CACHE,1,[Do we cache iconv descriptors])
+fi
+
+AC_MSG_RESULT($enable_iconv_cache)
+
+
dnl
dnl gettext support
dnl