When running autogen.sh in GNU gettext, I receive these warnings from autoconf:
configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level configure.ac:155: warning: AC_REQUIRE: `gl_SYS_TYPES_H' was expanded before it was required configure.ac:155: http://www.gnu.org/software/autoconf/manual/autoconf.html#Expanded-Before-Required gnulib-m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from... gnulib-m4/ftell.m4:7: gl_FUNC_FTELL is expanded from... gnulib-m4/gnulib-comp.m4:493: gl_INIT is expanded from... configure.ac:155: the top level The reason is that gl_SYS_TYPES_H is sometimes required and sometimes invoked: modules/sys_types:gl_SYS_TYPES_H m4/fseeko.m4: AC_REQUIRE([gl_SYS_TYPES_H]) m4/lseek.m4: AC_REQUIRE([gl_SYS_TYPES_H]) m4/ftello.m4: AC_REQUIRE([gl_SYS_TYPES_H]) At least in m4/lseek.m4 the AC_REQUIRE is actually needed (for off_t to be defined in the test program). This patch fixes it. 2013-03-02 Bruno Haible <br...@clisp.org> sys_types: Avoid autoconf warning about gl_SYS_TYPES_H. * m4/sys_types_h.m4 (gl_SYS_TYPES_H): Define through AC_DEFUN_ONCE. --- m4/sys_types_h.m4.orig Sat Mar 2 17:30:24 2013 +++ m4/sys_types_h.m4 Sat Mar 2 17:25:22 2013 @@ -1,10 +1,10 @@ -# sys_types_h.m4 serial 4 +# sys_types_h.m4 serial 5 dnl Copyright (C) 2011-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. -AC_DEFUN([gl_SYS_TYPES_H], +AC_DEFUN_ONCE([gl_SYS_TYPES_H], [ AC_REQUIRE([gl_SYS_TYPES_H_DEFAULTS]) gl_NEXT_HEADERS([sys/types.h])