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 # If the language specific compiler does not exist, but the "gcc" directory
6 # does, we do not build anything. Note, $r is set by the top-level Makefile.
7 # Note that when we look for the compiler, we search both with and without
8 # extension to handle cross and canadian cross builds.
9 # Note that if $norecursion is set we're being called from config.status,
10 # so don't check for the compiler; we might be doing a make clean.
13 if test -n "$r" && [ -z "$norecursion" ] ; then
14 if test -d "$r"/gcc; then
15 if test -f "$r"/gcc/$compiler_name \
16 || test -f "$r"/gcc/$compiler_name.exe; then
19 echo "rm -f multilib.out" > skip-this-dir
24 if [ "${srcdir}" = "." ] ; then
25 if [ "${with_target_subdir}" != "." ] ; then
26 topsrcdir=${with_multisrctop}../..
28 topsrcdir=${with_multisrctop}..
31 topsrcdir=${srcdir}/..
34 if [ -d ${topsrcdir}/gcc ] ; then
35 configdirs="tests testsuite"
40 srcname="ANSI C++ library"
41 package_makefile_frag=Make.pack
42 package_makefile_rules_frag=Make.pack.r
48 echo "# Warning: this fragment is automatically generated" > temp.mt
51 # If they didn't specify --enable-shared, don't generate shared libs.
52 case "${enable_shared}" in
55 *libstdc++*) shared=yes ;;
59 if [ "${shared}" = "yes" ]; then
61 alpha*-*-linux*) frags=../../config/mh-elfalphapic ;;
62 arm*-*-*) frags=../../config/mh-armpic ;;
63 hppa*-*-*) frags=../../config/mh-papic ;;
64 i[3456]86-*-*) frags=../../config/mh-x86pic ;;
66 powerpc*-*-*) frags=../../config/mh-ppcpic ;;
67 sparc*-*-*) frags=../../config/mh-sparcpic ;;
68 *-*-*) frags=../../config/mh-${target_cpu}pic ;;
71 *-*-aix*) frags="${frags} aix.ml" ;;
72 *-*-beos*) frags="${frags} beos.ml" ;;
73 *-dec-osf*) frags="${frags} dec-osf.ml";;
75 *-*-freebsd*) frags="${frags} freebsd.ml" ;;
76 *-*-hpux*) frags="${frags} hpux.ml" ;;
77 *-*-irix[56]*) frags="${frags} irix5.ml" ;;
79 *-*-linux*) frags="${frags} linux.ml" ;;
80 # This must come after *-*-linux*
81 *-*-gnu*) frags="${frags} gnu.ml" ;;
82 *-*-openbsd*) frags="${frags} openbsd.ml" ;;
83 *-*-sysv[45]*|*-*-udk*) frags="${frags} elf.ml" ;;
84 *-*-solaris*) frags="${frags} sol2shm.ml" ;;
85 *-*-sunos4*) frags="${frags} sunos4.ml" ;;
86 i[3456]86-*-interix*) frags="${frags} x86-interix.ml" ;;
90 # Make sure the right flags are defined for multi-threading.
93 frags="${frags} aix.mt" ;;
95 case "x${enable_threads}" in
96 xyes|xposix) frags="${frags} linux.mt" ;;
99 case "x${enable_threads}" in
100 xyes|xposix) frags="${frags} openbsd.mt" ;;
102 m68k-motorola-sysv) frags="${frags} delta.mt" ;;
104 case "x${enable_threads}" in
105 xposix) frags="${frags} sol2pth.mt" ;;
106 xsolaris) frags="${frags} sol2solth.mt" ;;
109 case "x${enable_threads}" in
110 xposix) frags="${frags} posix.mt" ;;
114 for frag in ${frags}; do
117 if [ ${srcdir} = . ]; then
118 [ -n "${with_target_subdir}" ] && frag=../${frag}
119 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
123 frag=${srcdir}/config/$frag
124 if [ -f ${frag} ]; then
125 echo "Appending ${frag} to target-mkfrag"
126 echo "# Following fragment copied from ${frag}" >> temp.mt
127 cat ${frag} >> temp.mt
131 target_makefile_frag=target-mkfrag
132 ${moveifchange} temp.mt target-mkfrag
137 XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}include -I${srcdir}/${TO_TOPDIR}gcc"
138 MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
139 CLEAN='$(CLEAN_JUNK)'
140 EXTRA_DISTCLEAN='target-mkfrag'
142 (. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
144 . ${topsrcdir}/config.if
146 LIBSTDCXX_INTERFACE=${libstdcxx_interface}
147 CXX_INTERFACE=${cxx_interface}
148 LIBC_INTERFACE=${libc_interface}
149 " >> ${package_makefile_frag}
151 # This duplicated the AC_PROG_LN_S macro in GNU autoconf.
153 if ln -s X conftestdata 2>/dev/null
162 " >> ${package_makefile_frag}
166 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
167 # depending on --enable-version-specific-runtime-libs.
168 if [ -n "${with_cross_host}" ] ; then
171 -e 's|^\([ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
172 Makefile >Makefile.tem
173 mv -f Makefile.tem Makefile
176 # enable multilib-ing by default.
177 if [ -z "${enable_multilib}" ]; then
181 . ${topsrcdir}/config-ml.in
184 # Specify the g++ header file directory
185 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
186 if test "${with_gxx_include_dir+set}" = set; then
187 withval="$with_gxx_include_dir"
190 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
194 *) gxx_include_dir=$with_gxx_include_dir ;;
198 if test x${gxx_include_dir} = x; then
199 if test x${enable_version_specific_runtime_libs} = xyes; then
200 gxx_include_dir='${libsubdir}/include/g++'
202 gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
207 sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
208 Makefile >Makefile.tem
209 mv -f Makefile.tem Makefile