From 5004e3e684c76f9b2d6800a995316c06c3915781 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 6 May 2011 12:55:33 +0200 Subject: [PATCH] error: Move AC_LIBOBJ invocations to module description. * m4/error.m4 (gl_ERROR): Inline AC_FUNC_ERROR_AT_LINE. Remove AC_LIBSOURCES invocation. Move AC_LIBOBJ and gl_PREREQ_ERROR invocations from here... * modules/error (configure.ac): ... to here. --- ChangeLog | 8 ++++++++ m4/error.m4 | 17 +++-------------- modules/error | 4 ++++ 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7d3fa4a428..3aa87cffad 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2011-05-06 Bruno Haible + + error: Move AC_LIBOBJ invocations to module description. + * m4/error.m4 (gl_ERROR): Inline AC_FUNC_ERROR_AT_LINE. Remove + AC_LIBSOURCES invocation. Move AC_LIBOBJ and gl_PREREQ_ERROR + invocations from here... + * modules/error (configure.ac): ... to here. + 2011-05-06 Bruno Haible duplocale: Move AC_LIBOBJ invocations to module description. diff --git a/m4/error.m4 b/m4/error.m4 index 6ea75ac029..e7022fe460 100644 --- a/m4/error.m4 +++ b/m4/error.m4 @@ -1,4 +1,4 @@ -#serial 13 +#serial 14 # Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc. # @@ -8,16 +8,8 @@ AC_DEFUN([gl_ERROR], [ - AC_FUNC_ERROR_AT_LINE - dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]). - gl_PREREQ_ERROR -]) - -# Redefine AC_FUNC_ERROR_AT_LINE, because it is no longer maintained in -# Autoconf. -AC_DEFUN([AC_FUNC_ERROR_AT_LINE], -[ - AC_LIBSOURCES([error.h, error.c])dnl + dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer + dnl maintained in Autoconf and because it invokes AC_LIBOBJ. AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line], [AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -25,9 +17,6 @@ AC_DEFUN([AC_FUNC_ERROR_AT_LINE], [[error_at_line (0, 0, "", 0, "an error occurred");]])], [ac_cv_lib_error_at_line=yes], [ac_cv_lib_error_at_line=no])]) - if test $ac_cv_lib_error_at_line = no; then - AC_LIBOBJ([error]) - fi ]) # Prerequisites of lib/error.c. diff --git a/modules/error b/modules/error index a1ec1e953f..ae12b45ad4 100644 --- a/modules/error +++ b/modules/error @@ -17,6 +17,10 @@ unistd [test $ac_cv_lib_error_at_line = no] configure.ac: gl_ERROR +if test $ac_cv_lib_error_at_line = no; then + AC_LIBOBJ([error]) + gl_PREREQ_ERROR +fi m4_ifdef([AM_XGETTEXT_OPTION], [AM_][XGETTEXT_OPTION([--flag=error:3:c-format]) AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])]) -- 2.30.2