changeset 14956:590a6b9eefc0

getcwd: Move AC_LIBOBJ invocations to module description. * m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD invocations from here... * modules/getcwd (configure.ac): ... to here.
author Bruno Haible <bruno@clisp.org>
date Sun, 08 May 2011 11:25:18 +0200
parents 2a2e0d5e8803
children 20685414cb63
files ChangeLog m4/getcwd.m4 modules/getcwd
diffstat 3 files changed, 13 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-05-08  Bruno Haible  <bruno@clisp.org>
+
+	getcwd: Move AC_LIBOBJ invocations to module description.
+	* m4/getcwd.m4 (gl_FUNC_GETCWD): Move AC_LIBOBJ and gl_PREREQ_GETCWD
+	invocations from here...
+	* modules/getcwd (configure.ac): ... to here.
+
 2011-05-08  Bruno Haible  <bruno@clisp.org>
 
 	getcwd-lgpl: Move AC_LIBOBJ invocations to module description.
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -97,10 +97,8 @@
   case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
   *yes,yes,no) ;;
   *)
-    dnl Full replacement, overrides LGPL replacement.
-    REPLACE_GETCWD=1
-    AC_LIBOBJ([getcwd])
-    gl_PREREQ_GETCWD;;
+    dnl Full replacement lib/getcwd.c, overrides LGPL replacement.
+    REPLACE_GETCWD=1;;
   esac
 ])
 
--- a/modules/getcwd
+++ b/modules/getcwd
@@ -20,6 +20,10 @@
 
 configure.ac:
 gl_FUNC_GETCWD
+if test $REPLACE_GETCWD = 1; then
+  AC_LIBOBJ([getcwd])
+  gl_PREREQ_GETCWD
+fi
 gl_MODULE_INDICATOR([getcwd])
 gl_UNISTD_MODULE_INDICATOR([getcwd])