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 configdirs="tests dbz stdio testsuite"
7 srcname="input/output library"
8 package_makefile_frag=Make.pack
14 echo "# Warning: this fragment is automatically generated" > temp.mt
18 *-hpux*) frags=hpux.mt ;;
20 frags=linuxlibc1.mt ;;
21 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
22 *-sco3.2v[45]*) frags=sco4.mt ;;
23 *-isc*) frags=isc.mt ;;
24 *-netware*) frags=netware.mt ;;
25 *) frags=${target_cpu}.mt ;;
28 case "${enable_shared}" in
31 *libio*) shared=yes ;;
35 if [ "${shared}" = "yes" ]; then
37 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
38 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
40 frags="${frags} ../../config/mh-elfalphapic" ;;
41 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
45 # Make a link for the correct stdio-lock.h file.
48 # We have a correct file in glibc but the libioP.h file is written
49 # with glibc 2.1 in mind which has the internals headers in special
50 # directory while glibc 2.0 has them in /usr/include. Create a wrapper
52 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
56 echo "#include <libc-lock.h>" > bits/libc-lock.h
57 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> bits/libc-lock.h
58 echo 'asm (".weak _pthread_cleanup_push_defer");' >> bits/libc-lock.h
60 echo "#include <stdio-lock.h>" > bits/stdio-lock.h
66 ln -s ${srcdir}/include/empty.h bits/stdio-lock.h
70 for frag in ${frags}; do
71 frag=${srcdir}/config/$frag
72 if [ -f ${frag} ]; then
73 echo "Appending ${frag} to target-mkfrag"
74 echo "# Following fragment copied from ${frag}" >> temp.mt
75 cat ${frag} >> temp.mt
79 target_makefile_frag=target-mkfrag
80 ${moveifchange} temp.mt target-mkfrag
84 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
85 XCINCLUDES='-I. -I$(srcdir)'
86 XCXXINCLUDES='-I. -I$(srcdir)'
87 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
88 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
89 CLEAN='_G_config.h *.a'
91 if [ -n "${with_cross_host}" ] ; then
92 CHECK_SUBDIRS=testsuite
94 (. ${srcdir}/config.shared) >${package_makefile_frag}
98 # If cross-compiling, don't build gperf or the utils. They
99 # will get built by the target compiler, which is confusing.
100 # We cannot test the installation. We install in $(tooldir).
101 if [ -n "${with_cross_host}" ] ; then
104 -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
105 Makefile >Makefile.tem
106 mv -f Makefile.tem Makefile
109 if [ "${srcdir}" = "." ] ; then
110 if [ "${with_target_subdir}" != "." ] ; then
111 . ${with_multisrctop}../../config-ml.in
113 . ${with_multisrctop}../config-ml.in
116 . ${srcdir}/../config-ml.in