]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/configure
Regenerated.
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / configure
1 # Local configure fragment for sysdeps/unix/sysv/linux.
2
3 # Don't bother trying to generate any glue code to be compatible with the
4 # existing system library, because we are the only system library.
5 inhibit_glue=yes
6
7 if test -n "$sysheaders"; then
8 OLD_CPPFLAGS=$CPPFLAGS
9 CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
10 fi
11 echo $ac_n "checking installed Linux kernel header files""... $ac_c" 1>&6
12 echo "configure:13: checking installed Linux kernel header files" >&5
13 if eval "test \"`echo '$''{'libc_cv_linux2010'+set}'`\" = set"; then
14 echo $ac_n "(cached) $ac_c" 1>&6
15 else
16 cat > conftest.$ac_ext <<EOF
17 #line 18 "configure"
18 #include "confdefs.h"
19 #include <linux/version.h>
20 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
21 eat flaming death
22 #endif
23 EOF
24 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25 egrep "eat flaming death" >/dev/null 2>&1; then
26 rm -rf conftest*
27 libc_cv_linux2010='TOO OLD!'
28 else
29 rm -rf conftest*
30 libc_cv_linux2010='2.0.10 or later'
31 fi
32 rm -f conftest*
33
34 fi
35
36 echo "$ac_t""$libc_cv_linux2010" 1>&6
37 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
38 { echo "configure: error: GNU libc requires kernel header files from
39 Linux 2.0.10 or later to be installed before configuring.
40 The kernel header files are found usually in /usr/include/asm and
41 /usr/include/linux; make sure these directories use files from
42 Linux 2.0.10 or later. This check uses <linux/version.h>, so
43 make sure that file was built correctly when installing the kernel header
44 files. To use kernel headers not from /usr/include/linux, use the
45 configure option --with-headers." 1>&2; exit 1; }
46 fi
47
48 # If the user gave a minimal version number test whether the available
49 # kernel headers are young enough. Additionally we have minimal
50 # kernel versions for some architectures.
51 case "$machine" in
52 alpha*)
53 arch_minimum_kernel=2.1.100
54 libc_cv_gcc_unwind_find_fde=yes
55 ;;
56 arm*)
57 arch_minimum_kernel=2.0.10
58 libc_cv_gcc_unwind_find_fde=yes
59 ;;
60 i386*)
61 libc_cv_gcc_unwind_find_fde=yes
62 arch_minimum_kernel=2.0.10
63 ;;
64 ia64*)
65 arch_minimum_kernel=2.4.0
66 ;;
67 hppa*)
68 arch_minimum_kernel=2.3.99
69 ;;
70 m68k*)
71 arch_minimum_kernel=2.0.10
72 libc_cv_gcc_unwind_find_fde=yes
73 ;;
74 mips*)
75 arch_minimum_kernel=2.2.15
76 libc_cv_gcc_unwind_find_fde=yes
77 ;;
78 powerpc*)
79 libc_cv_gcc_unwind_find_fde=yes
80 arch_minimum_kernel=2.0.10
81 ;;
82 s390/s390-32)
83 libc_cv_gcc_unwind_find_fde=yes
84 arch_minimum_kernel=2.2.10
85 ;;
86 s390/s390-64)
87 libc_cv_gcc_unwind_find_fde=yes
88 arch_minimum_kernel=2.4.0
89 ;;
90 sh*)
91 arch_minimum_kernel=2.3.99
92 libc_cv_gcc_unwind_find_fde=yes
93 ;;
94 sparc*)
95 libc_cv_gcc_unwind_find_fde=yes
96 arch_minimum_kernel=2.0.10
97 ;;
98 x86_64*)
99 arch_minimum_kernel=2.4.0
100 ;;
101 *)
102 arch_minimum_kernel=2.0.10
103 ;;
104 esac
105 if test -n "$minimum_kernel"; then
106
107 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
108 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
109
110 if test $user_version -lt $arch_version; then
111 echo "configure: warning: minimum kernel version reset to $arch_minimum_kernel" 1>&2
112 minimum_kernel=$arch_minimum_kernel
113 fi
114 else
115 if test $arch_minimum_kernel != '2.0.10'; then
116 minimum_kernel=$arch_minimum_kernel
117 fi
118 fi
119
120 if test -n "$minimum_kernel"; then
121 echo $ac_n "checking for kernel header at least $minimum_kernel""... $ac_c" 1>&6
122 echo "configure:123: checking for kernel header at least $minimum_kernel" >&5
123 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
124 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
125 cat > conftest.$ac_ext <<EOF
126 #line 127 "configure"
127 #include "confdefs.h"
128 #include <linux/version.h>
129 #if LINUX_VERSION_CODE < $decnum
130 eat flaming death
131 #endif
132 EOF
133 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
134 egrep "eat flaming death" >/dev/null 2>&1; then
135 rm -rf conftest*
136 libc_minimum_kernel='too old!'
137 else
138 rm -rf conftest*
139 libc_minimum_kernel=ok
140 fi
141 rm -f conftest*
142
143 echo "$ac_t""$libc_minimum_kernel" 1>&6
144 if test "$libc_minimum_kernel" = ok; then
145 cat >> confdefs.h <<EOF
146 #define __LINUX_KERNEL_VERSION $decnum
147 EOF
148
149 cat >> confdefs.h <<EOF
150 #define __ABI_TAG_VERSION $abinum
151 EOF
152
153 else
154 { echo "configure: error: *** The available kernel headers are older than the requested
155 *** compatible kernel version" 1>&2; exit 1; }
156 fi
157 fi
158
159 # The result of the above test for the use of the FDE code is invalid if
160 # the user overrides the decision about the minimum ABI.
161 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
162 libc_cv_gcc_unwind_find_fde=no
163 fi
164
165 if test -n "$sysheaders"; then
166 CPPFLAGS=$OLD_CPPFLAGS
167 fi
168 # The Linux filesystem standard prescribes where to place "essential"
169 # files. I.e., when the installation prefix is "/usr" we have to place
170 # shared library objects and the configuration files on the root partition
171 # in /lib and /etc.
172 if test "$prefix" = "/usr" -o "$prefix" = "/usr/"; then
173 # 64bit libraries on sparc go to /lib64 and not /lib
174 if test "$machine" = "sparc/sparc64" -o "$machine" = "x86_64"; then
175 libc_cv_slibdir="/lib64"
176 if test "$libdir" = '${exec_prefix}/lib'; then
177 libdir='${exec_prefix}/lib64';
178 # Locale data can be shared between 32bit and 64bit libraries
179 libc_cv_localedir='${exec_prefix}/lib/locale'
180 fi
181 else
182 libc_cv_slibdir="/lib"
183 fi
184 # Allow the user to override the path with --sysconfdir
185 if test $sysconfdir = '${prefix}/etc'; then
186 libc_cv_sysconfdir=/etc
187 else
188 libc_cv_sysconfdir=$sysconfdir
189 fi
190 libc_cv_rootsbindir="/sbin"
191 fi
192
193 # Under Linux the LinuxThreads add-on should be available.
194 case $add_ons in
195 # It is available. Good.
196 *linuxthreads*)
197 linuxthreads_missing=
198 ;;
199 *)
200 linuxthreads_missing=yes
201 ;;
202 esac
203
204 if test "$linuxthreads_missing"; then
205 if test $enable_sanity = yes; then
206 echo "\
207 *** On GNU/Linux systems it is normal to compile GNU libc with the
208 *** \`linuxthreads' add-on. Without that, the library will be
209 *** incompatible with normal GNU/Linux systems.
210 *** If you really mean to not use this add-on, run configure again
211 *** using the extra parameter \`--disable-sanity-checks'."
212 exit 1
213 else
214 echo "\
215 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
216 *** add-on?"
217 fi
218 fi
219
220 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
221 if test $enable_sanity = yes; then
222 echo "\
223 *** On GNU/Linux systems the GNU C Library should not be installed into
224 *** /usr/local since this might make your system totally unusable.
225 *** We strongly advise to use a different prefix. For details read the FAQ.
226 *** If you really mean to do this, run configure again using the extra
227 *** parameter \`--disable-sanity-checks'."
228 exit 1
229 else
230 echo "\
231 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
232 *** This might make your system totally unusable, for details read the FAQ."
233 fi
234 fi
235
236
237 # One Linux we use ldconfig.
238 use_ldconfig=yes
239
240 # We need some extensions to the `ldd' script.
241
242 case "$machine" in
243 i[3456]86* | m68*)
244 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
245 ;;
246 ia64*)
247 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
248 ;;
249 s390*)
250 ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
251 ;;
252 sparc*)
253 ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
254 ;;
255 x86_64*)
256 ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
257 ;;
258 *)
259 ;;
260 esac
261
262
263 if test $host = $build; then
264 # If $prefix/include/{net,scsi} are symlinks, make install will
265 # clobber what they're linked to (probably a kernel tree).
266 # test -L ought to work on all Linux boxes.
267 if test "x$prefix" != xNONE; then
268 ac_prefix=$prefix
269 else
270 ac_prefix=$ac_default_prefix
271 fi
272 echo $ac_n "checking for symlinks in ${ac_prefix}/include""... $ac_c" 1>&6
273 echo "configure:274: checking for symlinks in ${ac_prefix}/include" >&5
274 ac_message=
275 if test -L ${ac_prefix}/include/net; then
276 ac_message="$ac_message
277 ${ac_prefix}/include/net is a symlink"
278 fi
279 if test -L ${ac_prefix}/include/scsi; then
280 ac_message="$ac_message
281 ${ac_prefix}/include/scsi is a symlink"
282 fi
283 if test -n "$ac_message"; then
284 { echo "configure: error: $ac_message
285 \`make install' will destroy the target of the link(s).
286 Delete the links and re-run configure, or better still, move the entire
287 ${ac_prefix}/include directory out of the way." 1>&2; exit 1; }
288 else
289 echo "$ac_t""ok" 1>&6
290 fi
291 fi