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 dbz stdio testsuite"
37 configdirs="tests dbz stdio"
40 srcname="input/output 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
50 case x$enable_threads in
52 *) mtsafe=mtsafe.mt ;;
56 *-mpeix*) frags="mpeix.mt" ;;
57 *-hpux*) frags=hpux.mt ;;
59 frags="linux.mt linuxaxp1.mt $mtsafe" ;;
60 powerpc*-*-linux*libc1)
61 frags="linux.mt linuxaxp1.mt $mtsafe" ;;
63 frags=linuxlibc1.mt ;;
65 frags="linux.mt $mtsafe" ;;
66 *-isc*) frags=isc.mt ;;
67 *-netware*) frags=netware.mt ;;
68 *-dgux*) frags=dgux.mt ;;
69 *vxworks*) frags="vxworks.mt" ;;
70 *-beos*) frags="beos.mt $mtsafe" ;;
71 *) frags=${target_cpu}.mt ;;
74 case "${enable_shared}" in
77 *libio*) shared=yes ;;
81 if [ "${shared}" = "yes" ]; then
83 alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;;
84 arm*-*-*) frags="${frags} ../../config/mh-armpic" ;;
85 hppa*-*-*) frags="${frags} ../../config/mh-papic" ;;
86 i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;;
88 powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;;
89 sparc*-*-*) frags="${frags} ../../config/mh-sparcpic" ;;
90 *-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
94 # Take care of header file lossage.
97 # For some reason stdio-lock.h is not installed on Red Hat systems.
98 # Further, libc-lock.h needs to define the pthreads stuff weak, and
99 # fails to do this for other than _LIBC. Install our own versions
101 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
102 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
104 powerpc*-*-linux*libc1)
105 # For some reason stdio-lock.h is not installed on Red Hat systems.
106 # Further, libc-lock.h needs to define the pthreads stuff weak, and
107 # fails to do this for other than _LIBC. Install our own versions
109 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
110 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
113 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
114 # Create a wrapper if necessary.
115 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
117 echo " #include_next <libc-lock.h>" > libc-lock.h
118 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
119 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
125 for frag in ${frags}; do
128 if [ ${srcdir} = . ]; then
129 [ -n "${with_target_subdir}" ] && frag=../${frag}
130 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
134 frag=${srcdir}/config/$frag
135 if [ -f ${frag} ]; then
136 echo "Appending ${frag} to target-mkfrag"
137 echo "# Following fragment copied from ${frag}" >> temp.mt
138 cat ${frag} >> temp.mt
142 target_makefile_frag=target-mkfrag
143 ${moveifchange} temp.mt target-mkfrag
147 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
150 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
151 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
154 XCINCLUDES='-I. -I$(srcdir)'
155 XCXXINCLUDES='-I. -I$(srcdir)'
158 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
159 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
160 CLEAN='_G_config.h *.a'
162 if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
163 CHECK_SUBDIRS=testsuite
165 (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_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 . ${topsrcdir}/config-ml.in
182 # Specify the g++ header file directory
183 # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
184 if test "${with_gxx_include_dir+set}" = set; then
185 withval="$with_gxx_include_dir"
188 echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
192 *) gxx_include_dir=$with_gxx_include_dir ;;
196 if test x${gxx_include_dir} = x; then
197 if test x${enable_version_specific_runtime_libs} = xyes; then
198 gxx_include_dir='${libsubdir}/include/g++'
200 . ${topsrcdir}/config.if
201 gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
206 sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
207 Makefile >Makefile.tem
208 mv -f Makefile.tem Makefile