]>
Commit | Line | Data |
---|---|---|
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 | # If the language specific compiler does not exist, but the "gcc" directory | |
6 | # does, we do not build anything. Note, $r is set by the top-level Makefile. | |
7 | # Note that when we look for the compiler, we search both with and without | |
8 | # extension to handle cross and canadian cross builds. | |
9 | # Note that if $norecursion is set we're being called from config.status, | |
10 | # so don't check for the compiler; we might be doing a make clean. | |
11 | compiler_name=cc1plus | |
12 | rm -f skip-this-dir | |
13 | if test -n "$r" && [ -z "$norecursion" ] ; then | |
14 | if test -d "$r"/gcc; then | |
15 | if test -f "$r"/gcc/$compiler_name \ | |
16 | || test -f "$r"/gcc/$compiler_name.exe; then | |
17 | true | |
18 | else | |
19 | echo "rm -f multilib.out" > skip-this-dir | |
20 | fi | |
21 | fi | |
22 | fi | |
23 | ||
24 | if [ "${srcdir}" = "." ] ; then | |
25 | if [ "${with_target_subdir}" != "." ] ; then | |
26 | topsrcdir=${with_multisrctop}../.. | |
27 | else | |
28 | topsrcdir=${with_multisrctop}.. | |
29 | fi | |
30 | else | |
31 | topsrcdir=${srcdir}/.. | |
32 | fi | |
33 | ||
34 | if [ -d ${topsrcdir}/gcc ] ; then | |
35 | configdirs="tests dbz stdio testsuite" | |
36 | else | |
37 | configdirs="tests dbz stdio" | |
38 | fi | |
39 | srctrigger=libioP.h | |
40 | srcname="input/output library" | |
41 | package_makefile_frag=Make.pack | |
42 | package_makefile_rules_frag=Make.pack.r | |
43 | ||
44 | # per-host: | |
45 | ||
46 | # per-target: | |
47 | ||
48 | echo "# Warning: this fragment is automatically generated" > temp.mt | |
49 | frags= | |
50 | ||
51 | case "${target}" in | |
52 | *-mpeix*) frags="mpeix.mt" ;; | |
53 | *-hpux*) frags=hpux.mt ;; | |
54 | alpha*-*-linux-gnulibc1) | |
55 | frags="linux.mt linuxaxp1.mt mtsafe.mt" ;; | |
56 | powerpc*-*-linux-gnulibc1) | |
57 | frags="linux.mt linuxaxp1.mt mtsafe.mt" ;; | |
58 | *-linux-gnulibc1) | |
59 | frags=linuxlibc1.mt ;; | |
60 | *-linux-gnu*) frags="linux.mt mtsafe.mt" ;; | |
61 | *-sco3.2v[45]*) frags=sco4.mt ;; | |
62 | *-isc*) frags=isc.mt ;; | |
63 | *-netware*) frags=netware.mt ;; | |
64 | *-dgux*) frags=dgux.mt ;; | |
65 | *vxworks*) frags="vxworks.mt" ;; | |
66 | *-beos*) frags="beos.mt mtsafe.mt" ;; | |
67 | *) frags=${target_cpu}.mt ;; | |
68 | esac | |
69 | ||
70 | case "${enable_shared}" in | |
71 | yes) shared=yes ;; | |
72 | no) shared=no ;; | |
73 | *libio*) shared=yes ;; | |
74 | *) shared=no ;; | |
75 | esac | |
76 | ||
77 | if [ "${shared}" = "yes" ]; then | |
78 | case "${target}" in | |
79 | alpha*-*-linux*) frags="${frags} ../../config/mh-elfalphapic" ;; | |
80 | arm*-*-*) frags="${frags} ../../config/mh-armpic" ;; | |
81 | hppa*-*-*) frags="${frags} ../../config/mh-papic" ;; | |
82 | i[3456]86-*-*) frags="${frags} ../../config/mh-x86pic" ;; | |
83 | powerpc*-*-aix*) ;; | |
84 | powerpc*-*-*) frags="${frags} ../../config/mh-ppcpic" ;; | |
85 | *-*-*) frags="${frags} ../../config/mh-${target_cpu}pic" ;; | |
86 | esac | |
87 | fi | |
88 | ||
89 | # Take care of header file lossage. | |
90 | case "${target}" in | |
91 | alpha*-*-linux-gnulibc1) | |
92 | # For some reason stdio-lock.h is not installed on Red Hat systems. | |
93 | # Further, libc-lock.h needs to define the pthreads stuff weak, and | |
94 | # fails to do this for other than _LIBC. Install our own versions | |
95 | # of these files. | |
96 | cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h | |
97 | cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h | |
98 | ;; | |
99 | powerpc*-*-linux-gnulibc1) | |
100 | # For some reason stdio-lock.h is not installed on Red Hat systems. | |
101 | # Further, libc-lock.h needs to define the pthreads stuff weak, and | |
102 | # fails to do this for other than _LIBC. Install our own versions | |
103 | # of these files. | |
104 | cp ${srcdir}/config/linuxaxp1-libc-lock.h libc-lock.h | |
105 | cp ${srcdir}/config/linuxaxp1-stdio-lock.h stdio-lock.h | |
106 | ;; | |
107 | *-linux-gnu*) | |
108 | # We have a correct libc-lock.h in glibc 2.1 but not all glibc 2.0. | |
109 | # Create a wrapper if necessary. | |
110 | (echo "#include <bits/libc-lock.h>" | ${CC-cc} -E -) >/dev/null 2>&1 || | |
111 | { | |
112 | echo "#include_next <libc-lock.h>" > libc-lock.h | |
113 | echo 'asm (".weak _pthread_cleanup_pop_restore");' >> libc-lock.h | |
114 | echo 'asm (".weak _pthread_cleanup_push_defer");' >> libc-lock.h | |
115 | ||
116 | } | |
117 | ;; | |
118 | esac | |
119 | ||
120 | for frag in ${frags}; do | |
121 | case ${frag} in | |
122 | ../* ) | |
123 | if [ ${srcdir} = . ]; then | |
124 | [ -n "${with_target_subdir}" ] && frag=../${frag} | |
125 | [ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag} | |
126 | fi | |
127 | ;; | |
128 | esac | |
129 | frag=${srcdir}/config/$frag | |
130 | if [ -f ${frag} ]; then | |
131 | echo "Appending ${frag} to target-mkfrag" | |
132 | echo "# Following fragment copied from ${frag}" >> temp.mt | |
133 | cat ${frag} >> temp.mt | |
134 | fi | |
135 | done | |
136 | ||
137 | target_makefile_frag=target-mkfrag | |
138 | ${moveifchange} temp.mt target-mkfrag | |
139 | ||
140 | LIBDIR=yes | |
141 | TO_TOPDIR=../ | |
142 | ALL='$(_G_CONFIG_H) libio.a libiostream.a iostream.list' | |
143 | case "${target}" in | |
144 | *-*-cygwin*) | |
145 | XCINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include' | |
146 | XCXXINCLUDES='-I. -I$(srcdir) -I$(srcdir)/../winsup/include' | |
147 | ;; | |
148 | *) | |
149 | XCINCLUDES='-I. -I$(srcdir)' | |
150 | XCXXINCLUDES='-I. -I$(srcdir)' | |
151 | ;; | |
152 | esac | |
153 | MOSTLYCLEAN='*.o pic stamp-picdir core iostream.list' | |
154 | DISTCLEAN='config.status Makefile *~ Make.pack target-mkfrag multilib.out' | |
155 | CLEAN='_G_config.h *.a' | |
156 | INFO_FILES=iostream | |
157 | if [ -n "${with_cross_host}" -a -d ${topsrcdir}/gcc ]; then | |
158 | CHECK_SUBDIRS=testsuite | |
159 | fi | |
160 | (. ${srcdir}/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag} | |
161 | ||
162 | # post-target: | |
163 | ||
164 | # If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir) | |
165 | # depending on --enable-version-specific-runtime-libs. | |
166 | if [ -n "${with_cross_host}" ] ; then | |
167 | rm -f Makefile.tem | |
168 | sed \ | |
169 | -e 's|\(^[ ]*INSTALLDIR[ ]*=[ ]*\)\$(libdir)|\1$(tooldir)/lib|' \ | |
170 | Makefile >Makefile.tem | |
171 | mv -f Makefile.tem Makefile | |
172 | fi | |
173 | ||
174 | . ${topsrcdir}/config-ml.in | |
175 | ||
176 | gxx_include_dir= | |
177 | # Specify the g++ header file directory | |
178 | # Check whether --with-gxx-include-dir or --without-gxx-include-dir was given. | |
179 | if test "${with_gxx_include_dir+set}" = set; then | |
180 | withval="$with_gxx_include_dir" | |
181 | case "${withval}" in | |
182 | yes) | |
183 | echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2 | |
184 | exit 1 | |
185 | ;; | |
186 | no) ;; | |
187 | *) gxx_include_dir=$with_gxx_include_dir ;; | |
188 | esac | |
189 | fi | |
190 | ||
191 | if test x${gxx_include_dir} = x; then | |
192 | if test x${enable_version_specific_runtime_libs} = xyes; then | |
193 | gxx_include_dir='${libsubdir}/include/g++' | |
194 | else | |
195 | . ${topsrcdir}/config.if | |
196 | gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface} | |
197 | fi | |
198 | fi | |
199 | ||
200 | rm -f Makefile.tem | |
201 | sed -e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \ | |
202 | Makefile >Makefile.tem | |
203 | mv -f Makefile.tem Makefile |