25 |
# Use the libc supplied version of obstacks if available. |
# Use the libc supplied version of obstacks if available. |
26 |
AC_DEFUN([M4_AC_FUNC_OBSTACK], |
AC_DEFUN([M4_AC_FUNC_OBSTACK], |
27 |
[AC_PREREQ(2.56)dnl We use the new compiler based header checking in 2.56 |
[AC_PREREQ(2.56)dnl We use the new compiler based header checking in 2.56 |
28 |
AC_CHECK_HEADER(obstack.h, [], [], [AC_INCLUDES_DEFAULT]) |
AC_CHECK_HEADERS(stddef.h string.h obstack.h, [], [], [AC_INCLUDES_DEFAULT]) |
29 |
m4_pattern_allow([^m4_cv_func_obstack$])dnl |
m4_pattern_allow([^m4_cv_func_obstack$])dnl |
30 |
m4_pattern_allow([^m4_obstack_h$])dnl |
m4_pattern_allow([^m4_obstack_h$])dnl |
31 |
|
|
57 |
# The system does not provide obstack.h, or the user has specified |
# The system does not provide obstack.h, or the user has specified |
58 |
# to build without it. Unfortunately we can't leave an obstack.h |
# to build without it. Unfortunately we can't leave an obstack.h |
59 |
# file around anywhere in the include path if the system also |
# file around anywhere in the include path if the system also |
60 |
# provides an implementation: So we ship m4/gnu-obstack.h, and link |
# provides an implementation: So we ship m4/obstack_.h, and link |
61 |
# it to m4/obstack.h here (to substitute the missing system supplied |
# it to m4/obstack.h here (to substitute the missing system supplied |
62 |
# version). Hence, `#include <m4/obstack.h>' will work. |
# version). Hence, `#include <m4/obstack.h>' will work. |
63 |
INCLUDE_OBSTACK_H='#include <m4/obstack.h>' |
INCLUDE_OBSTACK_H='#include <m4/obstack.h>' |
64 |
AC_CONFIG_LINKS($m4_obstack_h:${top_srcdir}/m4/gnu-obstack.h) |
AC_CONFIG_LINKS($m4_obstack_h:m4/obstack_.h) |
65 |
|
|
66 |
if test x"$ac_cv_header_obstack_h" != xyes; then |
if test x"$ac_cv_header_obstack_h" != xyes; then |
67 |
OBSTACK_H=obstack.h |
OBSTACK_H=obstack.h |
68 |
fi |
fi |
69 |
|
|
70 |
# In the absence of a system implementation, we must compile our own: |
# In the absence of a system implementation, we must compile our own: |
71 |
|
AC_CHECK_HEADERS(stdlib.h, [], [], [AC_INCLUDES_DEFAULT]) |
72 |
AC_LIBOBJ(obstack) |
AC_LIBOBJ(obstack) |
73 |
|
|
74 |
fi |
fi |