changeset 15098:55bafac365c8

stpcpy: Move AC_LIBOBJ invocations to module description. * m4/stpcpy.m4 (gl_FUNC_STPCPY): Call AC_CHECK_FUNCS instead of AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STPCPY invocations from here... * modules/stpcpy (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 22 May 2011 12:48:51 +0200
parents 93a1703f75df
children 87e0d6cd3068
files ChangeLog m4/stpcpy.m4 modules/stpcpy
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,12 @@
-2011-05-21  Bruno Haible  <bruno@clisp.org>
+2011-05-22  Bruno Haible  <bruno@clisp.org>
+
+	stpcpy: Move AC_LIBOBJ invocations to module description.
+	* m4/stpcpy.m4 (gl_FUNC_STPCPY): Call AC_CHECK_FUNCS instead of
+	AC_REPLACE_FUNCS. Move AC_LIBOBJ and gl_PREREQ_STPCPY invocations from
+	here...
+	* modules/stpcpy (configure.ac): ... to here.
+
+2011-05-21  Bruno Haible  <bruno@clisp.org>
 
 	stat: Move AC_LIBOBJ invocations to module description.
 	* m4/stat.m4 (gl_PREREQ_STAT): New macro, extracted from gl_FUNC_STAT.
--- a/m4/stpcpy.m4
+++ b/m4/stpcpy.m4
@@ -1,4 +1,4 @@
-# stpcpy.m4 serial 7
+# stpcpy.m4 serial 8
 dnl Copyright (C) 2002, 2007, 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,
@@ -13,10 +13,9 @@
   AC_REQUIRE([AC_C_RESTRICT])
 
   AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
-  AC_REPLACE_FUNCS([stpcpy])
+  AC_CHECK_FUNCS([stpcpy])
   if test $ac_cv_func_stpcpy = no; then
     HAVE_STPCPY=0
-    gl_PREREQ_STPCPY
   fi
 ])
 
--- a/modules/stpcpy
+++ b/modules/stpcpy
@@ -11,6 +11,10 @@
 
 configure.ac:
 gl_FUNC_STPCPY
+if test $HAVE_STPCPY = 0; then
+  AC_LIBOBJ([stpcpy])
+  gl_PREREQ_STPCPY
+fi
 gl_STRING_MODULE_INDICATOR([stpcpy])
 
 Makefile.am: