changeset 15105:b93f270fadba

strncat: Move AC_LIBOBJ invocations to module description. * m4/strncat.m4 (gl_FUNC_STRNCAT): Move AC_LIBOBJ and gl_PREREQ_STRNCAT invocations from here... * modules/strncat (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 13:26:26 +0200
parents 037e4c930d72
children ed77fe40c360
files ChangeLog m4/strncat.m4 modules/strncat
diffstat 3 files changed, 13 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	strncat: Move AC_LIBOBJ invocations to module description.
+	* m4/strncat.m4 (gl_FUNC_STRNCAT): Move AC_LIBOBJ and gl_PREREQ_STRNCAT
+	invocations from here...
+	* modules/strncat (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
 	strdup, strdup-posix: Move AC_LIBOBJ invocations to module description.
--- a/m4/strncat.m4
+++ b/m4/strncat.m4
@@ -1,4 +1,4 @@
-# strncat.m4 serial 1
+# strncat.m4 serial 2
 dnl Copyright (C) 2002-2004, 2009-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,
@@ -92,11 +92,7 @@
     ])
   case "$gl_cv_func_strncat_works" in
     *yes) ;;
-    *)
-      REPLACE_STRNCAT=1
-      AC_LIBOBJ([strncat])
-      gl_PREREQ_STRNCAT
-      ;;
+    *) REPLACE_STRNCAT=1 ;;
   esac
 ])
 
--- a/modules/strncat
+++ b/modules/strncat
@@ -11,6 +11,10 @@
 
 configure.ac:
 gl_FUNC_STRNCAT
+if test $REPLACE_STRNCAT = 1; then
+  AC_LIBOBJ([strncat])
+  gl_PREREQ_STRNCAT
+fi
 gl_STRING_MODULE_INDICATOR([strncat])
 
 Makefile.am: