X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ferror.m4;h=1190e32c3d75b909eb289b184118561e51a93423;hb=c63a72ef0d158de1d98ca46e510adee2e4299e3b;hp=77680eda5dc85ddf942c39320d4e09989473f9d3;hpb=ae076edf952795deccc1922df142ecc74bbe835e;p=gnulib.git diff --git a/m4/error.m4 b/m4/error.m4 index 77680eda5..1190e32c3 100644 --- a/m4/error.m4 +++ b/m4/error.m4 @@ -1,8 +1,27 @@ -strerror_r +#serial 14 -dnl These are the prerequisite macros for GNU's error.c file. -AC_DEFUN(jm_PREREQ_ERROR, +# Copyright (C) 1996-1998, 2001-2004, 2009-2012 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_CHECK_FUNCS(strerror strerror_r vprintf doprnt) - AC_HEADER_STDC + AC_REQUIRE([AC_FUNC_STRERROR_R]) + : ])