configury: move local gnulib patches to build-aux subdirectory.
[m4/ericb.git] / ltdl / m4 / m4-obstack.m4
blobfab387babab7eddc82283d2f0555797ac0a13b5b
1 #                                                            -*- Autoconf -*-
2 # m4-obstack.m4 -- the libc supplied version of obstacks if available.
4 # Copyright (C) 2000-2001, 2003-2004, 2006-2007, 2010, 2013 Free
5 # Software Foundation, Inc.
6 # Written by Gary V. Vaughan <gary@gnu.org>
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 10
25 # M4_OBSTACK
26 # ----------
27 # Use the libc supplied version of obstacks if available.
28 AC_DEFUN([M4_OBSTACK],
29 [AC_PREREQ([2.56])dnl We use the compiler based header checking in 2.56
30 AC_BEFORE([gl_OBSTACK], [M4_OBSTACK])
31 AC_ARG_WITH([included-obstack],
32     [AS_HELP_STRING([--with-included-obstack],
33                     [use the obstack implementation included here])])
35 AC_CHECK_HEADERS([obstack.h], [], [], [AC_INCLUDES_DEFAULT])
37 if test "x${with_included_obstack-no}" != xno; then
38   ac_cv_func_obstack=no
41 OBSTACK_H=
42 if test $ac_cv_func_obstack = yes; then
43   INCLUDE_OBSTACK_H='#include <obstack.h>'
44 else
45   INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
46   OBSTACK_H=obstack.h
48 AC_SUBST([OBSTACK_H])
49 AC_SUBST([INCLUDE_OBSTACK_H])
50 ])# M4_FUNC_OBSTACK