]> gcc.gnu.org Git - gcc.git/blame - libstdc++/configure.in
Recognize _SOLTHREADS and define internal macros appropriately.
[gcc.git] / libstdc++ / configure.in
CommitLineData
6599da04
JM
1# This file is a shell script fragment that supplies the information
2# necessary for a configure script to process the program in
3# this directory. For more information, look at ../configure.
71205e0b
MH
4
5# If the language specific compiler does not exist, but the "gcc" directory does,
6# we do not build anything. Note, $r is set by the top-level Makefile.
7compiler_name=cc1plus
8rm -f skip-this-dir
9if test -n "$r"; then
10 if test -d "$r"/gcc; then
11 if test -f "$r"/gcc/$compiler_name; then
12 true
13 else
14 echo "rm -f multilib.out" > skip-this-dir
15 fi
16 fi
17fi
6599da04 18
3fdcc721
L
19if [ "${srcdir}" = "." ] ; then
20 if [ "${with_target_subdir}" != "." ] ; then
21 topsrcdir=${with_multisrctop}../..
22 else
23 topsrcdir=${with_multisrctop}..
24 fi
25else
26 topsrcdir=${srcdir}/..
27fi
28
29if [ -d ${topsrcdir}/gcc ] ; then
2c443622
JL
30 configdirs="tests testsuite"
31else
32 configdirs="tests"
33fi
6599da04
JM
34srctrigger=sinst.cc
35srcname="ANSI C++ library"
36package_makefile_frag=Make.pack
ef14509b 37package_makefile_rules_frag=Make.pack.r
6599da04
JM
38
39# per-host:
40
41# per-target:
42
43echo "# Warning: this fragment is automatically generated" > temp.mt
44frags=
45
46# If they didn't specify --enable-shared, don't generate shared libs.
47case "${enable_shared}" in
48 yes) shared=yes ;;
49 no) shared=no ;;
50 *libstdc++*) shared=yes ;;
51 *) shared=no ;;
52esac
53
54if [ "${shared}" = "yes" ]; then
55 case "${target}" in
56 hppa*-*-*) frags=../../config/mh-papic ;;
57 i[3456]86-*-*) frags=../../config/mh-x86pic ;;
58 *-*-*) frags=../../config/mh-${target_cpu}pic ;;
59 esac
60 case "${target}" in
61 *-dec-osf*) frags="${frags} dec-osf.ml";;
62 *-*-hpux*) frags="${frags} hpux.ml" ;;
63 *-*-irix[56]*) frags="${frags} irix5.ml" ;;
64 *-*-linux*aout*) ;;
65 *-*-linux*) frags="${frags} linux.ml" ;;
b07fe368 66 *-*-sysv[45]*|*-*-udk*) frags="${frags} elf.ml" ;;
6599da04
JM
67 *-*-solaris*) frags="${frags} sol2shm.ml" ;;
68 *-*-sunos4*) frags="${frags} sunos4.ml" ;;
69 *-*-aix*) frags="${frags} aix.ml" ;;
64e8166e 70 i[3456]86-*-interix*) frags="${frags} x86-interix.ml" ;;
6599da04
JM
71 esac
72fi
73
e693cc28
UD
74# Make sure the right flags are defined for multi-threading.
75case "${target}" in
93ad003a
FS
76 alpha*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
77 powerpc*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
78 *-*-linux-gnu) frags="${frags} linux.mt" ;;
79 m68k-motorola-sysv) frags="${frags} delta.mt" ;;
e693cc28
UD
80esac
81
6599da04 82for frag in ${frags}; do
c940e627
MH
83 case ${frag} in
84 ../* )
85 if [ ${srcdir} = . ]; then
86 [ -n "${with_target_subdir}" ] && frag=../${frag}
87 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
88 fi
89 ;;
90 esac
6599da04
JM
91 frag=${srcdir}/config/$frag
92 if [ -f ${frag} ]; then
93 echo "Appending ${frag} to target-mkfrag"
94 echo "# Following fragment copied from ${frag}" >> temp.mt
95 cat ${frag} >> temp.mt
96 fi
97done
98
99target_makefile_frag=target-mkfrag
100${moveifchange} temp.mt target-mkfrag
101
102LIBDIR=yes
103TO_TOPDIR=../
104ALL='libs'
105XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
106MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
107CLEAN='$(CLEAN_JUNK)'
108EXTRA_DISTCLEAN='target-mkfrag'
109
ef14509b 110(. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
6599da04 111
1b371329
L
112. ${topsrcdir}/config.if
113echo "
114LIBSTDCXX_INTERFACE=${libstdcxx_interface}
115CXX_INTERFACE=${cxx_interface}
116LIBC_INTERFACE=${libc_interface}
117" >> ${package_makefile_frag}
118
39268973
UD
119# This duplicated the AC_PROG_LN_S macro in GNU autoconf.
120rm -f conttestdata
121if ln -s X conftestdata 2>/dev/null
122then
123 rm -f conftestdata
124 LN_S="ln -s"
125else
126 LN_S=ln
127fi
128echo "
129LN_S=$LN_S
130" >> ${package_makefile_frag}
131
6599da04
JM
132# post-target:
133
f012a9fd
MH
134# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
135# depending on --enable-version-specific-runtime-libs.
6599da04
JM
136if [ -n "${with_cross_host}" ] ; then
137 rm -f Makefile.tem
138 sed \
f012a9fd 139 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
6599da04
JM
140 Makefile >Makefile.tem
141 mv -f Makefile.tem Makefile
142fi
143
3fdcc721 144. ${topsrcdir}/config-ml.in
This page took 0.199907 seconds and 5 git commands to generate.