1# =============================================================================
2#  https://www.gnu.org/software/autoconf-archive/ax_cxx_header_pre_stdcxx.html
3# =============================================================================
4#
5# SYNOPSIS
6#
7#   AX_CXX_HEADER_PRE_STDCXX
8#
9# DESCRIPTION
10#
11#   Check whether pre-ISO-C++ headers exist.
12#
13# LICENSE
14#
15#   Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com>
16#
17#   Copying and distribution of this file, with or without modification, are
18#   permitted in any medium without royalty provided the copyright notice
19#   and this notice are preserved. This file is offered as-is, without any
20#   warranty.
21
22#serial 8
23
24AU_ALIAS([AC_CXX_HEADER_PRE_STDCXX], [AX_CXX_HEADER_PRE_STDCXX])
25AC_DEFUN([AX_CXX_HEADER_PRE_STDCXX], [
26  AC_CACHE_CHECK(for pre-ISO C++ include files,
27  ax_cv_cxx_pre_stdcxx,
28  [AC_LANG_PUSH([C++])
29  ac_save_CXXFLAGS="$CXXFLAGS"
30  CXXFLAGS="$CXXFLAGS -Wno-deprecated"
31
32  # Omit defalloc.h, as compilation with newer compilers is problematic.
33  AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
34  #include <new.h>
35  #include <iterator.h>
36  #include <alloc.h>
37  #include <set.h>
38  #include <hashtable.h>
39  #include <hash_set.h>
40  #include <fstream.h>
41  #include <tempbuf.h>
42  #include <istream.h>
43  #include <bvector.h>
44  #include <stack.h>
45  #include <rope.h>
46  #include <complex.h>
47  #include <ostream.h>
48  #include <heap.h>
49  #include <iostream.h>
50  #include <function.h>
51  #include <multimap.h>
52  #include <pair.h>
53  #include <stream.h>
54  #include <iomanip.h>
55  #include <slist.h>
56  #include <tree.h>
57  #include <vector.h>
58  #include <deque.h>
59  #include <multiset.h>
60  #include <list.h>
61  #include <map.h>
62  #include <algobase.h>
63  #include <hash_map.h>
64  #include <algo.h>
65  #include <queue.h>
66  #include <streambuf.h>
67  ]], [])],
68  [ax_cv_cxx_pre_stdcxx=yes], [ax_cv_cxx_pre_stdcxx=no])
69  CXXFLAGS="$ac_save_CXXFLAGS"
70  AC_LANG_POP([C++])
71  ])
72  if test "$ax_cv_cxx_pre_stdcxx" = yes; then
73    AC_DEFINE(PRE_STDCXX_HEADERS,,[Define if pre-ISO C++ header files are present. ])
74  fi
75])
76