Mercurial > hg > octave-lyh > gnulib-hg
changeset 8092:bdbd1a6a7a67
Change the conditions under which strcasecmp.c is compiled.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 05 Feb 2007 02:09:22 +0000 |
parents | ebf2b19b5684 |
children | c3159b65e31c |
files | ChangeLog m4/strcase.m4 modules/string |
diffstat | 3 files changed, 11 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -10,9 +10,13 @@ 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>
--- a/m4/strcase.m4 +++ b/m4/strcase.m4 @@ -1,4 +1,4 @@ -# 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, @@ -13,11 +13,11 @@ 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],
--- a/modules/string +++ b/modules/string @@ -44,6 +44,7 @@ -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' \ @@ -53,7 +54,6 @@ -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