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 ;;
19 alpha*-*-linux-gnulibc1)
20 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
21 powerpc*-*-linux-gnulibc1)
22 frags="linux.mt linuxaxp1.mt mtsafe.mt" ;;
24 frags=linuxlibc1.mt ;;
25 *-linux-gnu) frags="linux.mt mtsafe.mt" ;;
26 *-sco3.2v[45]*) frags=sco4.mt ;;
27 *-isc*) frags=isc.mt ;;
28 *-netware*) frags=netware.mt ;;
29 *) frags=${target_cpu}.mt ;;
32 case "${enable_shared}" in
35 *libio*) shared=yes ;;
39 if [ "${shared}" = "yes" ]; then
41 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
42 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
44 frags="${frags} ../../config/mh-elfalphapic" ;;
45 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
49 # Take care of header file lossage.
51 alpha*-*-linux-gnulibc1)
52 # For some reason stdio-lock.h is not installed on Red Hat systems.
53 # Further, libc-lock.h needs to define the pthreads stuff weak, and
54 # fails to do this for other than _LIBC. Install our own versions
56 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
57 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
59 powerpc*-*-linux-gnulibc1)
60 # For some reason stdio-lock.h is not installed on Red Hat systems.
61 # Further, libc-lock.h needs to define the pthreads stuff weak, and
62 # fails to do this for other than _LIBC. Install our own versions
64 cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h
65 cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h
68 # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0.
69 # Create a wrapper if necessary.
70 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
72 echo "#include_next <libc-lock.h>" > libc-lock.h
73 echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h
74 echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h
80 for frag in ${frags}; do
81 frag=${srcdir}/config/$frag
82 if [ -f ${frag} ]; then
83 echo "Appending ${frag} to target-mkfrag"
84 echo "# Following fragment copied from ${frag}" >> temp.mt
85 cat ${frag} >> temp.mt
89 target_makefile_frag=target-mkfrag
90 ${moveifchange} temp.mt target-mkfrag
94 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
95 XCINCLUDES='-I. -I$(srcdir)'
96 XCXXINCLUDES='-I. -I$(srcdir)'
97 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
98 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
99 CLEAN='_G_config.h *.a'
101 if [ -n "${with_cross_host}" ] ; then
102 CHECK_SUBDIRS=testsuite
104 (. ${srcdir}/config.shared) >${package_makefile_frag}
108 # If cross-compiling, don't build gperf or the utils. They
109 # will get built by the target compiler, which is confusing.
110 # We cannot test the installation. We install in $(tooldir).
111 if [ -n "${with_cross_host}" ] ; then
114 -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
115 Makefile >Makefile.tem
116 mv -f Makefile.tem Makefile
119 if [ "${srcdir}" = "." ] ; then
120 if [ "${with_target_subdir}" != "." ] ; then
121 . ${with_multisrctop}../../config-ml.in
123 . ${with_multisrctop}../config-ml.in
126 . ${srcdir}/../config-ml.in