]> gcc.gnu.org Git - gcc.git/blob - libio/configure.in
ac94747f563dfc49dcc5a60498c0468a2b6bfae5
[gcc.git] / libio / configure.in
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.
4
5 configdirs="tests dbz stdio testsuite"
6 srctrigger=libioP.h
7 srcname="input/output library"
8 package_makefile_frag=Make.pack
9
10 # per-host:
11
12 # per-target:
13
14 echo "# Warning: this fragment is automatically generated" > temp.mt
15 frags=
16
17 case "${target}" in
18 *-hpux*) frags=hpux.mt ;;
19 *-linux-gnulibc1)
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 ;;
26 esac
27
28 case "${enable_shared}" in
29 yes) shared=yes ;;
30 no) shared=no ;;
31 *libio*) shared=yes ;;
32 *) shared=no ;;
33 esac
34
35 if [ "${shared}" = "yes" ]; then
36 case "${target}" in
37 hppa*-*) frags="${frags} ../../config/mh-papic" ;;
38 i[3456]86-*) frags="${frags} ../../config/mh-x86pic" ;;
39 alpha-*-linux*)
40 frags="${frags} ../../config/mh-elfalphapic" ;;
41 *) frags="${frags} ../../config/mh-${target_cpu}pic" ;;
42 esac
43 fi
44
45 # Make a link for the correct stdio-lock.h file.
46 case "${target}" in
47 *-linux-gnu)
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
51 # if necessary.
52 (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 ||
53 {
54 rm -fr bits
55 mkdir bits
56 echo "#include <libc-lock.h>" > bits/libc-lock.h
57 echo "#include <stdio-lock.h>" > bits/stdio-lock.h
58 }
59 ;;
60 *)
61 rm -fr bits
62 mkdir bits
63 ln -s ${srcdir}/include/empty.h bits/stdio-lock.h
64 ;;
65 esac
66
67 for frag in ${frags}; do
68 frag=${srcdir}/config/$frag
69 if [ -f ${frag} ]; then
70 echo "Appending ${frag} to target-mkfrag"
71 echo "# Following fragment copied from ${frag}" >> temp.mt
72 cat ${frag} >> temp.mt
73 fi
74 done
75
76 target_makefile_frag=target-mkfrag
77 ${moveifchange} temp.mt target-mkfrag
78
79 LIBDIR=yes
80 TO_TOPDIR=../
81 ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list'
82 XCINCLUDES='-I. -I$(srcdir)'
83 XCXXINCLUDES='-I. -I$(srcdir)'
84 MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list'
85 DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out'
86 CLEAN='_G_config.h *.a'
87 INFO_FILES=iostream
88 if [ -n "${with_cross_host}" ] ; then
89 CHECK_SUBDIRS=testsuite
90 fi
91 (. ${srcdir}/config.shared) >${package_makefile_frag}
92
93 # post-target:
94
95 # If cross-compiling, don't build gperf or the utils. They
96 # will get built by the target compiler, which is confusing.
97 # We cannot test the installation. We install in $(tooldir).
98 if [ -n "${with_cross_host}" ] ; then
99 rm -f Makefile.tem
100 sed \
101 -e 's|INSTALLDIR.*=.*$|INSTALLDIR = $(tooldir)/lib|' \
102 Makefile >Makefile.tem
103 mv -f Makefile.tem Makefile
104 fi
105
106 if [ "${srcdir}" = "." ] ; then
107 if [ "${with_target_subdir}" != "." ] ; then
108 . ${with_multisrctop}../../config-ml.in
109 else
110 . ${with_multisrctop}../config-ml.in
111 fi
112 else
113 . ${srcdir}/../config-ml.in
114 fi
This page took 0.04211 seconds and 5 git commands to generate.