]> gcc.gnu.org Git - gcc.git/blame - config.if
configure.in (alpha*-*-*): Aad config/alpha/t-alpha.
[gcc.git] / config.if
CommitLineData
a3cbd105
L
1#! /dev/null
2# Don't call it directly. This shell script fragment is called to
3# determine:
4#
5# 1. libstcxx_interface: the interface name for libstdc++.
6# 2. cxx_interface: the interface name for c++.
7# 3. libc_interface: the interface name for libc.
8#
9
10# Get the top level src dir.
11if [ -z "${topsrcdir}" -a -z "${top_srcdir}" ]
12then
13 echo "Undefined top level src dir: topsrcdir and top_srcdir are empty" >&2
14 exit 1
15fi
16
17if [ -n "${topsrcdir}" ]
18then
19 if_topsrcdir=${topsrcdir}
20else
21 if_topsrcdir=${top_srcdir}
22fi
23
17090313
BK
24if [ "${enable_libstdcxx_v3}" = "yes" ] ; then
25 libstdcxx_srcdir=${if_topsrcdir}/libstdc++-v3
26else
27 libstdcxx_srcdir=${if_topsrcdir}/libstdc++
28fi
29
30echo "${libstdcxx_srcdir} is where"
31if [ -f ${libstdcxx_srcdir}/Makefile.in ]; then
a3cbd105 32# We check libstdc++ for libstdcxx_interface.
17090313 33libstdcxx_interface=`grep "^INTERFACE" ${libstdcxx_srcdir}/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
1b8a4ef3
JL
34else
35libstdcxx_interface=
36fi
a3cbd105 37
1b8a4ef3 38if [ -f ${if_topsrcdir}/gcc/cp/Makefile.in ]; then
a3cbd105
L
39# We check gcc/cp for cxx_interface.
40cxx_interface=`grep "^INTERFACE" ${if_topsrcdir}/gcc/cp/Makefile.in | sed 's/INTERFACE[ ]*=[ ]*\(.*\)/\1/'`
1b8a4ef3
JL
41else
42cxx_interface=
43fi
a3cbd105
L
44
45# The trickiest part is libc_interface.
46if [ -z "${libc_interface}" ]
47then
48 case ${target_os} in
49 *linux*libc1*|*linux*libc5*)
50 case ${target_alias} in
51 *alpha*|*powerpc*)
52 libc_interface=-libc5.9-
53 ;;
54 *)
55 libc_interface=-libc5-
56 ;;
57 esac
58 ;;
59 *linux*gnu*)
60 # We have to work harder to figure it out.
61 if [ ${target_alias} = ${build_alias} ]
62 then
63 dummy=if$$
64 cat >$dummy.c <<EOF
65#include <features.h>
66main(argc, argv)
67 int argc;
68 char *argv[];
69{
70 printf("%d\n", __GLIBC_MINOR__);
71 return 0;
72}
73EOF
74 ${CC-cc} $dummy.c -o $dummy 2>/dev/null
75 if [ "$?" = 0 ]
76 then
77 libc_interface=-libc6.`./$dummy`-
78 rm -f $dummy.c $dummy
79 else
80 # It should never happen.
81 echo "Cannot find the GNU C library minor version number." >&2
82 rm -f $dummy.c $dummy
83 exit 1
84 fi
85 else
86 # Cross compiling. Assume glibc 2.1.
87 libc_interface=-libc6.1-
88 fi
89 ;;
90 *)
91 libc_interface=-
92 ;;
93 esac
94fi
This page took 0.10918 seconds and 5 git commands to generate.