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 dbz stdio testsuite"
47 configdirs="tests dbz stdio"
50 srcname="input/output 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
62 *-hpux*) frags=hpux.mt ;;
63 alpha*-*-linux-gnulibc1)
64 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
65 powerpc*-*-linux-gnulibc1)
66 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
68 frags=linuxlibc1.mt ;;
69 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
70 *-sco3.2v[45]*) frags=sco4.mt ;;
71 *-isc*) frags=isc.mt ;;
72 *-netware*) frags=netware.mt ;;
73 *) frags=${target_cpu}.mt ;;
76 case "${enable_shared}" in
79 *libio*) shared=yes ;;
83 if [ "${shared}" = "yes" ]; then
85 alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
86 arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
87 hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
88 i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
90 powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
91 *-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
95 # Take care of header file lossage.
97 alpha*-*-linux-gnulibc1)
98 # For some reason stdio-lock.h is not installed on Red Hat systems.
99 # Further, libc-lock.h needs to define the pthreads stuff weak, and
100 # fails to do this for other than _LIBC. Install our own versions
102 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
103 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
105 powerpc*-*-linux-gnulibc1)
106 # For some reason stdio-lock.h is not installed on Red Hat systems.
107 # Further, libc-lock.h needs to define the pthreads stuff weak, and
108 # fails to do this for other than _LIBC. Install our own versions
110 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
111 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
114 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
115 # Create a wrapper if necessary.
116 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
118 echo "#include_next <libc-lock.h>" > libc-lock.h
119 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
120 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
126 for frag in ${frags}; do
129 if [ ${srcdir} = . ]; then
130 [ -n "${with_target_subdir}" ] && frag=../${frag}
131 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
135 frag=${srcdir}/config/$frag
136 if [ -f ${frag} ]; then
137 echo "Appending ${frag} to target-mkfrag"
138 echo "# Following fragment copied from ${frag}" >> temp.mt
139 cat ${frag} >> temp.mt
143 target_makefile_frag=target-mkfrag
144 ${moveifchange} temp.mt target-mkfrag
148 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
151 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
152 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
155 XCINCLUDES='-I. -I$(srcdir)'
156 XCXXINCLUDES='-I. -I$(srcdir)'
159 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
160 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
161 CLEAN='_G_config.h *.a'
163 if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
164 CHECK_SUBDIRS=testsuite
166 (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
170 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
171 # depending on --enable-version-specific-runtime-libs.
172 if [ -n "${with_cross_host}" ] ; then
175 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
176 Makefile >Makefile.tem
177 mv -f Makefile.tem Makefile
180 . ${topsrcdir}/config-ml.in
183 # Specify the g++ header file directory
184 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
185 if test "${with_gxx_include_dir+set}" = set; then
186 withval="$with_gxx_include_dir"
189 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
193 *) gxx_include_dir=$with_gxx_include_dir ;;
197 if test x${gxx_include_dir} = x; then
198 if test x${enable_version_specific_runtime_libs} = xyes; then
199 gxx_include_dir='${libsubdir}/include/g++'
201 topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
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