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.
5 # find a possible extension of the just-built C++ compiler. Note that this
6 # is not the only choice, taking into cross and canadian cross into
7 # account, and we need to search for with and without the extension.
8 case "${host_alias}" in
17 # If the language specific compiler does not exist, but the "gcc" directory
18 # does, we do not build anything. Note, $r is set by the top-level Makefile.
19 # Note that when we look for the compiler, we search both with and without
20 # extension to handle cross and canadian cross builds.
24 if test -d "$r"/gcc; then
25 if test -f "$r"/gcc/$compiler_name \
26 || test -f "$r"/gcc/$compiler_name$EXEEXT; then
29 echo "rm -f multilib.out" > skip-this-dir
34 if [ "${srcdir}" = "." ] ; then
35 if [ "${with_target_subdir}" != "." ] ; then
36 topsrcdir=${with_multisrctop}../..
38 topsrcdir=${with_multisrctop}..
41 topsrcdir=${srcdir}/..
44 if [ -d ${topsrcdir}/gcc ] ; then
45 configdirs="tests testsuite"
50 srcname="ANSI C++ library"
51 package_makefile_frag=Make.pack
52 package_makefile_rules_frag=Make.pack.r
58 echo "# Warning: this fragment is automatically generated" > temp.mt
61 # If they didn't specify --enable-shared, don't generate shared libs.
62 case "${enable_shared}" in
65 *libstdc++*) shared=yes ;;
69 if [ "${shared}" = "yes" ]; then
71 alpha*-*-linux*) frags=../../config/mh-elfalphapic ;;
72 arm*-*-*) frags=../../config/mh-armpic ;;
73 hppa*-*-*) frags=../../config/mh-papic ;;
74 i[3456]86-*-*) frags=../../config/mh-x86pic ;;
76 powerpc*-*-*) frags=../../config/mh-ppcpic ;;
77 *-*-*) frags=../../config/mh-${target_cpu}pic ;;
80 *-dec-osf*) frags="${frags} dec-osf.ml";;
81 *-*-hpux*) frags="${frags} hpux.ml" ;;
82 *-*-irix[56]*) frags="${frags} irix5.ml" ;;
85 *-*-freebsd*) frags="${frags} freebsd.ml" ;;
86 *-*-linux*) frags="${frags} linux.ml" ;;
87 *-*-openbsd*) frags="${frags} openbsd.ml" ;;
88 *-*-sysv[45]*|*-*-udk*) frags="${frags} elf.ml" ;;
89 *-*-solaris*) frags="${frags} sol2shm.ml" ;;
90 *-*-sunos4*) frags="${frags} sunos4.ml" ;;
91 *-*-aix*) frags="${frags} aix.ml" ;;
92 i[3456]86-*-interix*) frags="${frags} x86-interix.ml" ;;
96 # Make sure the right flags are defined for multi-threading.
98 alpha*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
99 powerpc*-*-linux-gnulibc1) frags="${frags} linux.mt" ;;
100 *-*-linux-gnu) frags="${frags} linux.mt" ;;
102 case "x${enable_threads}" in
103 xyes|xposix) frags="${frags} openbsd.mt" ;;
105 m68k-motorola-sysv) frags="${frags} delta.mt" ;;
107 case "x${enable_threads}" in
108 xposix) frags="${frags} sol2pth.mt" ;;
109 xsolaris) frags="${frags} sol2solth.mt" ;;
112 case "x${enable_threads}" in
113 xposix) frags="${frags} posix.mt" ;;
117 for frag in ${frags}; do
120 if [ ${srcdir} = . ]; then
121 [ -n "${with_target_subdir}" ] && frag=../${frag}
122 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
126 frag=${srcdir}/config/$frag
127 if [ -f ${frag} ]; then
128 echo "Appending ${frag} to target-mkfrag"
129 echo "# Following fragment copied from ${frag}" >> temp.mt
130 cat ${frag} >> temp.mt
134 target_makefile_frag=target-mkfrag
135 ${moveifchange} temp.mt target-mkfrag
140 XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
141 MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
142 CLEAN='$(CLEAN_JUNK)'
143 EXTRA_DISTCLEAN='target-mkfrag'
145 (. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
147 . ${topsrcdir}/config.if
149 LIBSTDCXX_INTERFACE=${libstdcxx_interface}
150 CXX_INTERFACE=${cxx_interface}
151 LIBC_INTERFACE=${libc_interface}
152 " >> ${package_makefile_frag}
154 # This duplicated the AC_PROG_LN_S macro in GNU autoconf.
156 if ln -s X conftestdata 2>/dev/null
165 " >> ${package_makefile_frag}
169 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
170 # depending on --enable-version-specific-runtime-libs.
171 if [ -n "${with_cross_host}" ] ; then
174 -e 's|^\([ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
175 Makefile >Makefile.tem
176 mv -f Makefile.tem Makefile
179 # enable multilib-ing by default.
180 if [ -z "${enable_multilib}" ]; then
184 . ${topsrcdir}/config-ml.in
187 # Specify the g++ header file directory
188 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
189 if test "${with_gxx_include_dir+set}" = set; then
190 withval="$with_gxx_include_dir"
193 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
197 *) gxx_include_dir=$with_gxx_include_dir ;;
201 if test x${gxx_include_dir} = x; then
202 if test x${enable_version_specific_runtime_libs} = xyes; then
203 gxx_include_dir='${libsubdir}/include/g++'
205 gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
210 sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
211 Makefile >Makefile.tem
212 mv -f Makefile.tem Makefile