X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Ferror.m4;h=1190e32c3d75b909eb289b184118561e51a93423;hb=c63a72ef0d158de1d98ca46e510adee2e4299e3b;hp=eb0f776bbaff46ee3d7ddc96c16ee9ce75bcd620;hpb=962862c0d15d95da00f9b27a1ca8bfdbe9cafdf5;p=gnulib.git diff --git a/m4/error.m4 b/m4/error.m4 index eb0f776bb..1190e32c3 100644 --- a/m4/error.m4 +++ b/m4/error.m4 @@ -1,11 +1,27 @@ -#serial 1 +#serial 14 -dnl FIXME: put these prerequisite-only *.m4 files in a separate -dnl directory -- otherwise, they'll conflict with existing files. +# 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. -dnl These are the prerequisite macros for GNU's error.c file. -AC_DEFUN(jm_PREREQ_ERROR, +AC_DEFUN([gl_ERROR], [ - AC_CHECK_FUNCS(strerror strerror_r vprintf doprnt) - AC_HEADER_STDC + 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]) + : ])