OSDN Git Service

richi's fixes for c++ bootstrap
[pf3gnuchains/gcc-fork.git] / libcpp / aclocal.m4
1 # generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 m4_include([../config/acx.m4])
15 m4_include([../config/codeset.m4])
16 m4_include([../config/depstand.m4])
17 m4_include([../config/gettext-sister.m4])
18 m4_include([../config/iconv.m4])
19 m4_include([../config/lead-dot.m4])
20 m4_include([../config/lib-ld.m4])
21 m4_include([../config/lib-link.m4])
22 m4_include([../config/lib-prefix.m4])
23 m4_include([../config/override.m4])
24 m4_include([../config/warnings.m4])
25
26 ## ---------------------------------------------------------------- ##
27 ## Checking for declared symbols.                                   ##
28 ## This is like *AC_CHECK_DECL*, except that for c++, we may use a  ##
29 ## prototype to check for a (possibly overloaded) function.         ##
30 ## ---------------------------------------------------------------- ##
31
32
33 # _AC_CHECK_PROTO_BODY
34 # -------------------
35 # Shell function body for AC_CHECK_PROTO.
36 m4_define([_AC_CHECK_PROTO_BODY],
37 [  AS_LINENO_PUSH([$[]1])
38   [as_decl_name=`echo $][2|sed 's/(.*//'`]
39   [as_decl_use=`echo $][2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`]
40   AC_CACHE_CHECK([whether $as_decl_name is declared], [$[]3],
41   [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$[]4],
42 [@%:@ifndef $[]as_decl_name
43 @%:@ifdef __cplusplus
44   (void) $[]as_decl_use;
45 @%:@else
46   (void) $[]as_decl_name;
47 @%:@endif
48 @%:@endif
49 ])],
50                    [AS_VAR_SET([$[]3], [yes])],
51                    [AS_VAR_SET([$[]3], [no])])])
52   AS_LINENO_POP
53 ])# _AC_CHECK_PROTO_BODY
54
55 # AC_CHECK_PROTO(SYMBOL,
56 #               [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
57 #               [INCLUDES = DEFAULT-INCLUDES])
58 # -------------------------------------------------------
59 # Check whether SYMBOL (a function, variable, or constant) is declared.
60 AC_DEFUN([AC_CHECK_PROTO],
61 [AC_REQUIRE_SHELL_FN([ac_fn_]_AC_LANG_ABBREV[_check_proto],
62   [AS_FUNCTION_DESCRIBE([ac_fn_]_AC_LANG_ABBREV[_check_proto],
63     [LINENO SYMBOL VAR],
64     [Tests whether SYMBOL is declared, setting cache variable VAR accordingly.])],
65   [_$0_BODY])]dnl
66 [AS_VAR_PUSHDEF([ac_Symbol], [ac_cv_have_decl_$1])]dnl
67 [ac_fn_[]_AC_LANG_ABBREV[]_check_proto ]dnl
68 ["$LINENO" "$1" "ac_Symbol" "AS_ESCAPE([AC_INCLUDES_DEFAULT([$4])], [""])"
69 AS_VAR_IF([ac_Symbol], [yes], [$2], [$3])
70 AS_VAR_POPDEF([ac_Symbol])dnl
71 ])# AC_CHECK_PROTO
72
73
74 # _AC_CHECK_PROTOS(SYMBOL, ACTION-IF_FOUND, ACTION-IF-NOT-FOUND,
75 #                  INCLUDES)
76 # -------------------------------------------------------------
77 # Helper to AC_CHECK_PROTOS, which generates the check for a single
78 # SYMBOL with INCLUDES, performs the AC_DEFINE, then expands
79 # ACTION-IF-FOUND or ACTION-IF-NOT-FOUND.
80 m4_define([_AC_CHECK_PROTOS],
81 [AC_CHECK_PROTO([$1], [ac_have_decl=1], [ac_have_decl=0], [$4])]dnl
82 [AC_DEFINE_UNQUOTED(AS_TR_CPP(patsubst(HAVE_DECL_[$1],[(.*])), [$ac_have_decl],
83   [Define to 1 if you have the declaration of `$1',
84    and to 0 if you don't.])]dnl
85 [m4_ifvaln([$2$3], [AS_IF([test $ac_have_decl = 1], [$2], [$3])])])
86
87 # AC_CHECK_PROTOS(SYMBOLS,
88 #                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
89 #                 [INCLUDES = DEFAULT-INCLUDES])
90 # --------------------------------------------------------
91 # Defines HAVE_DECL_SYMBOL to 1 if declared, 0 otherwise.  See the
92 # documentation for a detailed explanation of this difference with
93 # other AC_CHECK_*S macros.  SYMBOLS is an m4 list.
94 AC_DEFUN([AC_CHECK_PROTOS],
95 [m4_map_args_sep([_$0(], [, [$2], [$3], [$4])], [], $1)])