Change the conditional link warning.
(mbscasecmp): New declaration.
* m4/mbscasecmp.m4: New file.
+ * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
+ the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
+ REPLACE_STRCASECMP.
* m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
GNULIB_MBSCASECMP.
* modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
+ Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
* MODULES.html.sh (Internationalization functions): Add mbscasecmp.
2007-02-04 Bruno Haible <bruno@clisp.org>
-# strcase.m4 serial 6
+# strcase.m4 serial 7
dnl Copyright (C) 2002, 2005-2007 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
AC_DEFUN([gl_FUNC_STRCASECMP],
[
AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
- dnl No known system has a strcasecmp() function that works correctly in
- dnl multibyte locales. Therefore we use our version always.
- AC_LIBOBJ(strcasecmp)
- REPLACE_STRCASECMP=1
- gl_PREREQ_STRCASECMP
+ AC_REPLACE_FUNCS(strcasecmp)
+ if test $ac_cv_func_strcasecmp = no; then
+ HAVE_STRCASECMP=0
+ gl_PREREQ_STRCASECMP
+ fi
])
AC_DEFUN([gl_FUNC_STRNCASECMP],
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
-e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \
-e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
-e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
-e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
- -e 's|@''REPLACE_STRCASECMP''@|$(REPLACE_STRCASECMP)|g' \
-e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
< $(srcdir)/string_.h; \
} > $@-t