changeset 15099:87e0d6cd3068

stpncpy: Move AC_LIBOBJ invocations to module description. * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Move AC_LIBOBJ invocations from here... * modules/stpncpy (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 12:51:13 +0200
parents 55bafac365c8
children cd153bca26fc
files ChangeLog m4/stpncpy.m4 modules/stpncpy
diffstat 3 files changed, 12 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	stpncpy: Move AC_LIBOBJ invocations to module description.
+	* m4/stpncpy.m4 (gl_FUNC_STPNCPY): Move AC_LIBOBJ invocations from
+	here...
+	* modules/stpncpy (configure.ac): ... to here.
+
 2011-05-22  Bruno Haible  <bruno@clisp.org>
 
 	stpcpy: Move AC_LIBOBJ invocations to module description.
--- a/m4/stpncpy.m4
+++ b/m4/stpncpy.m4
@@ -1,4 +1,4 @@
-# stpncpy.m4 serial 13
+# stpncpy.m4 serial 14
 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -78,13 +78,9 @@
         [Define if you have the stpncpy() function and it works.])
     else
       REPLACE_STPNCPY=1
-      AC_LIBOBJ([stpncpy])
-      gl_PREREQ_STPNCPY
     fi
   else
     HAVE_STPNCPY=0
-    AC_LIBOBJ([stpncpy])
-    gl_PREREQ_STPNCPY
   fi
 ])
 
--- a/modules/stpncpy
+++ b/modules/stpncpy
@@ -11,6 +11,10 @@
 
 configure.ac:
 gl_FUNC_STPNCPY
+if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then
+  AC_LIBOBJ([stpncpy])
+  gl_PREREQ_STPNCPY
+fi
 gl_STRING_MODULE_INDICATOR([stpncpy])
 
 Makefile.am: