ftruncate: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Sat, 7 May 2011 11:42:47 +0000 (13:42 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:06:01 +0000 (00:06 +0200)
* m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Move AC_LIBOBJ and
gl_PREREQ_FTRUNCATE invocations from here...
* modules/ftruncate (configure.ac): ... to here.

ChangeLog
m4/ftruncate.m4
modules/ftruncate

index 18546a2..9513a99 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2011-05-07  Bruno Haible  <bruno@clisp.org>
 
+       ftruncate: Move AC_LIBOBJ invocations to module description.
+       * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): Move AC_LIBOBJ and
+       gl_PREREQ_FTRUNCATE invocations from here...
+       * modules/ftruncate (configure.ac): ... to here.
+
+2011-05-07  Bruno Haible  <bruno@clisp.org>
+
        fsync: Move AC_LIBOBJ invocations to module description.
        * m4/fsync.m4 (gl_FUNC_FSYNC): Move AC_LIBOBJ and gl_PREREQ_FSYNC
        invocations from here...
index 95d3dab..c3c3342 100644 (file)
@@ -1,4 +1,4 @@
-# serial 15
+# serial 16
 
 # See if we need to emulate a missing ftruncate function using fcntl or chsize.
 
@@ -21,8 +21,6 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
   AC_CHECK_FUNCS_ONCE([ftruncate])
   if test $ac_cv_func_ftruncate = no; then
     HAVE_FTRUNCATE=0
-    AC_LIBOBJ([ftruncate])
-    gl_PREREQ_FTRUNCATE
     case "$host_os" in
       mingw*)
         # Yes, we know mingw lacks ftruncate.
index e8aec5d..6be248c 100644 (file)
@@ -16,6 +16,10 @@ unistd
 
 configure.ac:
 gl_FUNC_FTRUNCATE
+if test $HAVE_FTRUNCATE = 0; then
+  AC_LIBOBJ([ftruncate])
+  gl_PREREQ_FTRUNCATE
+fi
 gl_UNISTD_MODULE_INDICATOR([ftruncate])
 
 Makefile.am: