From: Bruno Haible Date: Fri, 6 May 2011 10:55:33 +0000 (+0200) Subject: error: Move AC_LIBOBJ invocations to module description. X-Git-Tag: v0.1~2592 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=5004e3e684c76f9b2d6800a995316c06c3915781;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 7d3fa4a42..3aa87cffa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 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. * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Move AC_LIBOBJ and gl_PREREQ_DUPLOCALE invocations from here... diff --git a/m4/error.m4 b/m4/error.m4 index 6ea75ac02..e7022fe46 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 a1ec1e953..ae12b45ad 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])])