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