fseeko: Respect rules for use of AC_LIBOBJ.
authorBruno Haible <bruno@clisp.org>
Sat, 7 May 2011 11:18:23 +0000 (13:18 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Jun 2011 11:05:46 +0000 (13:05 +0200)
* m4/fseeko.m4 (gl_REPLACE_FSEEKO): Remove macro.
(gl_FUNC_FSEEKO): Inline it here. Move AC_LIBOBJ invocation from
here...
* modules/fseeko (configure.ac): ... to here.

ChangeLog
m4/fseeko.m4
modules/fseeko

index 2966496..26333bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-07  Bruno Haible  <bruno@clisp.org>
+
+       fseeko: Respect rules for use of AC_LIBOBJ.
+       * m4/fseeko.m4 (gl_REPLACE_FSEEKO): Remove macro.
+       (gl_FUNC_FSEEKO): Inline it here. Move AC_LIBOBJ invocation from
+       here...
+       * modules/fseeko (configure.ac): ... to here.
+
 2011-06-13  Bruno Haible  <bruno@clisp.org>
 
        gnulib-tool: Allow comments in the 'Depends-on' section.
index 28da81b..b7d53c9 100644 (file)
@@ -1,4 +1,4 @@
-# fseeko.m4 serial 12
+# fseeko.m4 serial 13
 dnl Copyright (C) 2007-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,
@@ -17,18 +17,21 @@ AC_DEFUN([gl_FUNC_FSEEKO],
 
   if test $gl_cv_func_fseeko = no; then
     HAVE_FSEEKO=0
-    gl_REPLACE_FSEEKO
   else
     if test $gl_cv_var_stdin_large_offset = no; then
-      gl_REPLACE_FSEEKO
+      REPLACE_FSEEKO=1
     fi
+    m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
+      gl_FUNC_FFLUSH_STDIN
+      if test $gl_cv_func_fflush_stdin = no; then
+        REPLACE_FSEEKO=1
+      fi
+    ])
+  fi
+  if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+    dnl If we are also using the fseek module, then fseek needs replacing, too.
+    m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
   fi
-  m4_ifdef([gl_FUNC_FFLUSH_STDIN], [
-    gl_FUNC_FFLUSH_STDIN
-    if test $gl_cv_func_fflush_stdin = no; then
-      gl_REPLACE_FSEEKO
-    fi
-  ])
 ])
 
 dnl Tests whether fseeko is available.
@@ -48,18 +51,6 @@ AC_DEFUN([gl_HAVE_FSEEKO],
     ])
 ])
 
-AC_DEFUN([gl_REPLACE_FSEEKO],
-[
-  AC_REQUIRE([gl_STDIO_H_DEFAULTS])
-  AC_REQUIRE([gl_HAVE_FSEEKO])
-  if test $gl_cv_func_fseeko = yes; then
-    REPLACE_FSEEKO=1
-  fi
-  AC_LIBOBJ([fseeko])
-  dnl If we are also using the fseek module, then fseek needs replacing, too.
-  m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
-])
-
 dnl Code shared by fseeko and ftello.  Determine if large files are supported,
 dnl but stdin does not start as a large file by default.
 AC_DEFUN([gl_STDIN_LARGE_OFFSET],
index 3581d8a..62464e6 100644 (file)
@@ -16,6 +16,9 @@ AC_REQUIRE([AC_FUNC_FSEEKO])
 
 configure.ac:
 gl_FUNC_FSEEKO
+if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
+  AC_LIBOBJ([fseeko])
+fi
 gl_STDIO_MODULE_INDICATOR([fseeko])
 
 Makefile.am: