From: Bruno Haible Date: Sat, 7 May 2011 11:18:23 +0000 (+0200) Subject: fseeko: Respect rules for use of AC_LIBOBJ. X-Git-Tag: v0.1~2617 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=4339de4d67fd1786714b913ec8992a08e8fd0fe3;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 2966496c4..26333bf24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-07 Bruno Haible + + 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 gnulib-tool: Allow comments in the 'Depends-on' section. diff --git a/m4/fseeko.m4 b/m4/fseeko.m4 index 28da81b1c..b7d53c932 100644 --- a/m4/fseeko.m4 +++ b/m4/fseeko.m4 @@ -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], diff --git a/modules/fseeko b/modules/fseeko index 3581d8a7b..62464e64c 100644 --- a/modules/fseeko +++ b/modules/fseeko @@ -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: