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