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.
21 # Note that if $norecursion is set we're being called from config.status,
22 # so don't check for the compiler; we might be doing a make clean.
25 if test -n "$r" && [ -z "$norecursion" ] ; then
26 if test -d "$r"/gcc; then
27 if test -f "$r"/gcc/$compiler_name \
28 || test -f "$r"/gcc/$compiler_name$EXEEXT; then
31 echo "rm -f multilib.out" > skip-this-dir
36 if [ "${srcdir}" = "." ] ; then
37 if [ "${with_target_subdir}" != "." ] ; then
38 topsrcdir=${with_multisrctop}../..
40 topsrcdir=${with_multisrctop}..
43 topsrcdir=${srcdir}/..
46 if [ -d ${topsrcdir}/gcc ] ; then
47 configdirs="tests dbz stdio testsuite"
49 configdirs="tests dbz stdio"
52 srcname="input/output library"
53 package_makefile_frag=Make.pack
54 package_makefile_rules_frag=Make.pack.r
60 echo "# Warning: this fragment is automatically generated" > temp.mt
64 *-hpux*) frags=hpux.mt ;;
65 alpha*-*-linux-gnulibc1)
66 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
67 powerpc*-*-linux-gnulibc1)
68 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
70 frags=linuxlibc1.mt ;;
71 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
72 *-sco3.2v[45]*) frags=sco4.mt ;;
73 *-isc*) frags=isc.mt ;;
74 *-netware*) frags=netware.mt ;;
75 *) frags=${target_cpu}.mt ;;
78 case "${enable_shared}" in
81 *libio*) shared=yes ;;
85 if [ "${shared}" = "yes" ]; then
87 alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
88 arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
89 hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
90 i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
92 powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
93 *-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
97 # Take care of header file lossage.
99 alpha*-*-linux-gnulibc1)
100 # For some reason stdio-lock.h is not installed on Red Hat systems.
101 # Further, libc-lock.h needs to define the pthreads stuff weak, and
102 # fails to do this for other than _LIBC. Install our own versions
104 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
105 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
107 powerpc*-*-linux-gnulibc1)
108 # For some reason stdio-lock.h is not installed on Red Hat systems.
109 # Further, libc-lock.h needs to define the pthreads stuff weak, and
110 # fails to do this for other than _LIBC. Install our own versions
112 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
113 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
116 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
117 # Create a wrapper if necessary.
118 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
120 echo "#include_next <libc-lock.h>" > libc-lock.h
121 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
122 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
128 for frag in ${frags}; do
131 if [ ${srcdir} = . ]; then
132 [ -n "${with_target_subdir}" ] && frag=../${frag}
133 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
137 frag=${srcdir}/config/$frag
138 if [ -f ${frag} ]; then
139 echo "Appending ${frag} to target-mkfrag"
140 echo "# Following fragment copied from ${frag}" >> temp.mt
141 cat ${frag} >> temp.mt
145 target_makefile_frag=target-mkfrag
146 ${moveifchange} temp.mt target-mkfrag
150 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
153 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
154 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
157 XCINCLUDES='-I. -I$(srcdir)'
158 XCXXINCLUDES='-I. -I$(srcdir)'
161 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
162 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
163 CLEAN='_G_config.h *.a'
165 if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
166 CHECK_SUBDIRS=testsuite
168 (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
172 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
173 # depending on --enable-version-specific-runtime-libs.
174 if [ -n "${with_cross_host}" ] ; then
177 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
178 Makefile >Makefile.tem
179 mv -f Makefile.tem Makefile
182 . ${topsrcdir}/config-ml.in
185 # Specify the g++ header file directory
186 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
187 if test "${with_gxx_include_dir+set}" = set; then
188 withval="$with_gxx_include_dir"
191 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
195 *) gxx_include_dir=$with_gxx_include_dir ;;
199 if test x${gxx_include_dir} = x; then
200 if test x${enable_version_specific_runtime_libs} = xyes; then
201 gxx_include_dir='${libsubdir}/include/g++'
203 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
204 gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
209 sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
210 Makefile >Makefile.tem
211 mv -f Makefile.tem Makefile