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 does,
6 # we do not build anything. Note, $r is set by the top-level Makefile.
10 if test -d "$r"/gcc; then
11 if test -f "$r"/gcc/$compiler_name; then
14 echo "rm -f multilib.out" > skip-this-dir
19 if [ "${srcdir}" = "." ] ; then
20 if [ "${with_target_subdir}" != "." ] ; then
21 topsrcdir=${with_multisrctop}../..
23 topsrcdir=${with_multisrctop}..
26 topsrcdir=${srcdir}/..
29 if [ -d ${topsrcdir}/gcc ] ; then
30 configdirs="tests dbz stdio testsuite"
32 configdirs="tests dbz stdio"
35 srcname="input/output library"
36 package_makefile_frag=Make.pack
37 package_makefile_rules_frag=Make.pack.r
43 echo "# Warning: this fragment is automatically generated" > temp.mt
47 *-hpux*) frags=hpux.mt ;;
48 alpha*-*-linux-gnulibc1)
49 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
50 powerpc*-*-linux-gnulibc1)
51 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
53 frags=linuxlibc1.mt ;;
54 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
55 *-sco3.2v[45]*) frags=sco4.mt ;;
56 *-isc*) frags=isc.mt ;;
57 *-netware*) frags=netware.mt ;;
58 *) frags=${target_cpu}.mt ;;
61 case "${enable_shared}" in
64 *libio*) shared=yes ;;
68 if [ "${shared}" = "yes" ]; then
70 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
71 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
73 frags="${frags} ../../config/mh-elfalphapic" ;;
74 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
78 # Take care of header file lossage.
80 alpha*-*-linux-gnulibc1)
81 # For some reason stdio-lock.h is not installed on Red Hat systems.
82 # Further, libc-lock.h needs to define the pthreads stuff weak, and
83 # fails to do this for other than _LIBC. Install our own versions
85 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
86 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
88 powerpc*-*-linux-gnulibc1)
89 # For some reason stdio-lock.h is not installed on Red Hat systems.
90 # Further, libc-lock.h needs to define the pthreads stuff weak, and
91 # fails to do this for other than _LIBC. Install our own versions
93 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
94 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
97 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
98 # Create a wrapper if necessary.
99 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
101 echo "#include_next <libc-lock.h>" > libc-lock.h
102 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
103 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
109 for frag in ${frags}; do
112 if [ ${srcdir} = . ]; then
113 [ -n "${with_target_subdir}" ] && frag=../${frag}
114 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
118 frag=${srcdir}/config/$frag
119 if [ -f ${frag} ]; then
120 echo "Appending ${frag} to target-mkfrag"
121 echo "# Following fragment copied from ${frag}" >> temp.mt
122 cat ${frag} >> temp.mt
126 target_makefile_frag=target-mkfrag
127 ${moveifchange} temp.mt target-mkfrag
131 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
134 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
135 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
138 XCINCLUDES='-I. -I$(srcdir)'
139 XCXXINCLUDES='-I. -I$(srcdir)'
142 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
143 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
144 CLEAN='_G_config.h *.a'
146 if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
147 CHECK_SUBDIRS=testsuite
149 (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
153 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
154 # depending on --enable-version-specific-runtime-libs.
155 if [ -n "${with_cross_host}" ] ; then
158 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
159 Makefile >Makefile.tem
160 mv -f Makefile.tem Makefile
163 . ${topsrcdir}/config-ml.in