error: Move AC_LIBOBJ invocations to module description.
authorBruno Haible <bruno@clisp.org>
Fri, 6 May 2011 10:55:33 +0000 (12:55 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 15 Jun 2011 22:05:55 +0000 (00:05 +0200)
* 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
m4/error.m4
modules/error

index 7d3fa4a..3aa87cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2011-05-06  Bruno Haible  <bruno@clisp.org>
 
+       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  <bruno@clisp.org>
+
        duplocale: Move AC_LIBOBJ invocations to module description.
        * m4/duplocale.m4 (gl_FUNC_DUPLOCALE): Move AC_LIBOBJ and
        gl_PREREQ_DUPLOCALE invocations from here...
index 6ea75ac..e7022fe 100644 (file)
@@ -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.
index a1ec1e9..ae12b45 100644 (file)
@@ -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])])