strcase: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sun, 22 May 2011 10:59:31 +0000 (12:59 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:49 +0000 (00:06 +0200)
* m4/strcase.m4 (gl_FUNC_STRNCASECMP): Set HAVE_STRNCASECMP.
(gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Call AC_CHECK_FUNCS instead
of AC_REPLACE_FUNCS. Move AC_LIBOBJ, gl_PREREQ_STRCASECMP,
gl_PREREQ_STRNCASECMP invocations from here...
* modules/strcase (configure.ac): ... to here.

ChangeLog
m4/strcase.m4
modules/strcase

index ed3e21f564b849e9145ebb51465a673ad7935e4d..b55e62811cb0825d6ac4e8491b9d96055ba3bea6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+       strcase: Move AC_LIBOBJ invocations to module description.
+       * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Set HAVE_STRNCASECMP.
+       (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Call AC_CHECK_FUNCS instead
+       of AC_REPLACE_FUNCS. Move AC_LIBOBJ, gl_PREREQ_STRCASECMP,
+       gl_PREREQ_STRNCASECMP invocations from here...
+       * modules/strcase (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
        stpncpy: Move AC_LIBOBJ invocations to module description.
index 1c553ff21090509d8ef52eef4c42987301f053ad..c676176c835b8fd240e2fc3edfa895321ab27c27 100644 (file)
@@ -1,4 +1,4 @@
-# strcase.m4 serial 10
+# strcase.m4 serial 11
 dnl Copyright (C) 2002, 2005-2011 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,19 +13,20 @@ AC_DEFUN([gl_STRCASE],
 AC_DEFUN([gl_FUNC_STRCASECMP],
 [
   AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
-  AC_REPLACE_FUNCS([strcasecmp])
+  AC_CHECK_FUNCS([strcasecmp])
   if test $ac_cv_func_strcasecmp = no; then
     HAVE_STRCASECMP=0
-    gl_PREREQ_STRCASECMP
   fi
 ])
 
 AC_DEFUN([gl_FUNC_STRNCASECMP],
 [
   AC_REQUIRE([gl_HEADER_STRINGS_H_DEFAULTS])
-  AC_REPLACE_FUNCS([strncasecmp])
-  if test $ac_cv_func_strncasecmp = no; then
-    gl_PREREQ_STRNCASECMP
+  AC_CHECK_FUNCS([strncasecmp])
+  if test $ac_cv_func_strncasecmp = yes; then
+    HAVE_STRNCASECMP=1
+  else
+    HAVE_STRNCASECMP=0
   fi
   AC_CHECK_DECLS([strncasecmp])
   if test $ac_cv_have_decl_strncasecmp = no; then
index 0c91e06c4f65db5fa8945f747e5aa2373831f3de..9ca97af2148f27a59b2f3c18fc00885d9f8db27c 100644 (file)
@@ -17,6 +17,14 @@ strings
 
 configure.ac:
 gl_STRCASE
+if test $HAVE_STRCASECMP = 0; then
+  AC_LIBOBJ([strcasecmp])
+  gl_PREREQ_STRCASECMP
+fi
+if test $HAVE_STRNCASECMP = 0; then
+  AC_LIBOBJ([strncasecmp])
+  gl_PREREQ_STRNCASECMP
+fi
 
 Makefile.am: