configury: move autoconf macros to build-aux subdirectory.
[m4/ericb.git] / build-aux / m4 / m4-error.m4
blob27695cbbe8d1e241f99a509c89b5a1ceedcb8204
1 #                                                            -*- Autoconf -*-
2 # m4-error.m4 -- Use the installed version of error.h if available.
3 # Written by Gary V. Vaughan <gary@gnu.org>
5 # Copyright (C) 2003-2004, 2006-2007, 2010, 2013 Free Software
6 # Foundation, Inc.
8 # This file is part of GNU M4.
10 # GNU M4 is free software: you can redistribute it and/or modify
11 # it under the terms of the GNU General Public License as published by
12 # the Free Software Foundation, either version 3 of the License, or
13 # (at your option) any later version.
15 # GNU M4 is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
23 # serial 4
25 # M4_ERROR
26 # --------
27 # Use the installed version of error.h if available.
28 AC_DEFUN([M4_ERROR],
29 [AC_BEFORE([gl_ERROR], [M4_ERROR])
31 AC_CHECK_HEADERS([error.h],
32     [ERROR_H=""], [ERROR_H="error.h"], [AC_INCLUDES_DEFAULT])
33 AC_SUBST([ERROR_H])
35 if test $ac_cv_header_error_h = yes; then
36   INCLUDE_ERROR_H='#include <error.h>'
37 else
38   INCLUDE_ERROR_H='#include <gnu/error.h>'
40 AC_SUBST([INCLUDE_ERROR_H])
41 ])# M4_ERROR