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 [ "${srcdir}" = "." ] ; then
6 if [ "${with_target_subdir}" != "." ] ; then
7 topsrcdir=${with_multisrctop}../..
9 topsrcdir=${with_multisrctop}..
12 topsrcdir=${srcdir}/..
15 if [ -d ${topsrcdir}/gcc ] ; then
16 configdirs="tests dbz stdio testsuite"
18 configdirs="tests dbz stdio"
21 srcname="input/output library"
22 package_makefile_frag=Make.pack
23 package_makefile_rules_frag=Make.pack.r
29 echo "# Warning: this fragment is automatically generated" > temp.mt
33 *-hpux*) frags=hpux.mt ;;
34 alpha*-*-linux-gnulibc1)
35 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
36 powerpc*-*-linux-gnulibc1)
37 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
39 frags=linuxlibc1.mt ;;
40 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
41 *-sco3.2v[45]*) frags=sco4.mt ;;
42 *-isc*) frags=isc.mt ;;
43 *-netware*) frags=netware.mt ;;
44 *) frags=${target_cpu}.mt ;;
47 case "${enable_shared}" in
50 *libio*) shared=yes ;;
54 if [ "${shared}" = "yes" ]; then
56 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
57 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
59 frags="${frags} ../../config/mh-elfalphapic" ;;
60 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
64 # Take care of header file lossage.
66 alpha*-*-linux-gnulibc1)
67 # For some reason stdio-lock.h is not installed on Red Hat systems.
68 # Further, libc-lock.h needs to define the pthreads stuff weak, and
69 # fails to do this for other than _LIBC. Install our own versions
71 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
72 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
74 powerpc*-*-linux-gnulibc1)
75 # For some reason stdio-lock.h is not installed on Red Hat systems.
76 # Further, libc-lock.h needs to define the pthreads stuff weak, and
77 # fails to do this for other than _LIBC. Install our own versions
79 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
80 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
83 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
84 # Create a wrapper if necessary.
85 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
87 echo "#include_next <libc-lock.h>" > libc-lock.h
88 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
89 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
95 for frag in ${frags}; do
98 if [ ${srcdir} = . ]; then
99 [ -n "${with_target_subdir}" ] && frag=../${frag}
100 [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
104 frag=${srcdir}/config/$frag
105 if [ -f ${frag} ]; then
106 echo "Appending ${frag} to target-mkfrag"
107 echo "# Following fragment copied from ${frag}" >> temp.mt
108 cat ${frag} >> temp.mt
112 target_makefile_frag=target-mkfrag
113 ${moveifchange} temp.mt target-mkfrag
117 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
120 XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
121 XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include'
124 XCINCLUDES='-I. -I$(srcdir)'
125 XCXXINCLUDES='-I. -I$(srcdir)'
128 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
129 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
130 CLEAN='_G_config.h *.a'
132 if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then
133 CHECK_SUBDIRS=testsuite
135 (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
139 # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
140 # depending on --enable-version-specific-runtime-libs.
141 if [ -n "${with_cross_host}" ] ; then
144 -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \
145 Makefile >Makefile.tem
146 mv -f Makefile.tem Makefile
149 . ${topsrcdir}/config-ml.in