X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ferror.m4;h=e7022fe4604309d08fa1eb624fd8826b14f841f2;hb=fa7cfa720110dc45ed470592c6bbb8c69f3b84ee;hp=eac272a5080a271ab18382053b92c44170857c95;hpb=44ec9731a3e3e51d6bc1d19b782ab32beb14d94f;p=gnulib.git diff --git a/m4/error.m4 b/m4/error.m4 index eac272a50..e7022fe46 100644 --- a/m4/error.m4 +++ b/m4/error.m4 @@ -1,13 +1,28 @@ -dnl From Jim Meyering. Use this if you use the GNU error.[ch]. -dnl FIXME: Migrate into libit +#serial 14 -AC_DEFUN(AM_FUNC_ERROR_AT_LINE, -[AC_CACHE_CHECK([for error_at_line], am_cv_lib_error_at_line, - [AC_TRY_LINK([],[error_at_line(0, 0, "", 0, "");], - am_cv_lib_error_at_line=yes, - am_cv_lib_error_at_line=no)]) - if test $am_cv_lib_error_at_line = no; then - LIBOBJS="$LIBOBJS error.o" - fi - AC_SUBST(LIBOBJS)dnl +# Copyright (C) 1996-1998, 2001-2004, 2009-2011 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +AC_DEFUN([gl_ERROR], +[ + 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( + [[#include ]], + [[error_at_line (0, 0, "", 0, "an error occurred");]])], + [ac_cv_lib_error_at_line=yes], + [ac_cv_lib_error_at_line=no])]) +]) + +# Prerequisites of lib/error.c. +AC_DEFUN([gl_PREREQ_ERROR], +[ + AC_REQUIRE([AC_FUNC_STRERROR_R]) + AC_REQUIRE([AC_C_INLINE]) + : ])