changeset 15121:4ae1058b7455

strverscmp: Move AC_LIBOBJ invocations to module description. * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Call AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRVERSCMP invocations from here... * modules/strverscmp (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 14:56:07 +0200
parents c9ecfab74059
children 15f55e6c30d6
files ChangeLog m4/strverscmp.m4 modules/strverscmp
diffstat 3 files changed, 14 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	strverscmp: Move AC_LIBOBJ invocations to module description.
+	* m4/strverscmp.m4 (gl_FUNC_STRVERSCMP): Call AC_CHECK_FUNCS instead of
+	AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STRVERSCMP invocations
+	from here...
+	* modules/strverscmp (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
 	strtok_r: Move AC_LIBOBJ invocations to module description.
--- a/m4/strverscmp.m4
+++ b/m4/strverscmp.m4
@@ -1,4 +1,4 @@
-# strverscmp.m4 serial 7
+# strverscmp.m4 serial 8
 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,
@@ -10,9 +10,8 @@
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([strverscmp])
+  AC_CHECK_FUNCS([strverscmp])
   if test $ac_cv_func_strverscmp = no; then
-    gl_PREREQ_STRVERSCMP
     HAVE_STRVERSCMP=0
   fi
 ])
--- a/modules/strverscmp
+++ b/modules/strverscmp
@@ -11,6 +11,10 @@
 
 configure.ac:
 gl_FUNC_STRVERSCMP
+if test $HAVE_STRVERSCMP = 0; then
+  AC_LIBOBJ([strverscmp])
+  gl_PREREQ_STRVERSCMP
+fi
 gl_STRING_MODULE_INDICATOR([strverscmp])
 
 Makefile.am: