]>
Commit | Line | Data |
---|---|---|
a3cbd105 L |
1 | #! /dev/null |
2 | # Don't call it directly. This shell script fragment is called to | |
3 | # determine: | |
4 | # | |
53c40185 | 5 | # 1. libstcxx_incdir: the interface name for libstdc++. |
a3cbd105 L |
6 | # |
7 | ||
8 | # Get the top level src dir. | |
9 | if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ] | |
10 | then | |
11 | echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2 | |
12 | exit 1 | |
13 | fi | |
14 | ||
15 | if [ -n "${topsrcdir}" ] | |
16 | then | |
17 | if_topsrcdir=${topsrcdir} | |
18 | else | |
19 | if_topsrcdir=${top_srcdir} | |
20 | fi | |
21 | ||
53c40185 BK |
22 | # Set libstdcxx_incdir. |
23 | # This is the same as gcc/configure.in and libstdc++-v3/acinclude.m4. | |
a693735b AO |
24 | if test -z "$gcc_version"; then |
25 | if test -z "${gcc_version_trigger}" \ | |
26 | && test -f ${if_topsrcdir}/gcc/version.c; then | |
27 | gcc_version_trigger=${if_topsrcdir}/gcc/version.c | |
28 | fi | |
29 | if test -f "${gcc_version_trigger}"; then | |
30 | gcc_version_full=`grep version_string "${gcc_version_trigger}" | sed -e 's/.*"\([^"]*\)".*/\1/'` | |
31 | else | |
32 | gcc_version_full=`$CC -v 2>&1 | sed -n 's/^gcc version //p'` | |
33 | fi | |
34 | gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'` | |
35 | fi | |
53c40185 | 36 | libstdcxx_incdir=c++/${gcc_version} |
a3cbd105 | 37 |