]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/configure
* sysdeps/powerpc/fpu/fenv_libc.h: Add libm_hidden_proto for
[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 grep that handles long lines and -e" >&5
26 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
27 if test "${ac_cv_path_GREP+set}" = set; then
28 echo $ECHO_N "(cached) $ECHO_C" >&6
29 else
30 # Extract the first word of "grep ggrep" to use in msg output
31 if test -z "$GREP"; then
32 set dummy grep ggrep; ac_prog_name=$2
33 if test "${ac_cv_path_GREP+set}" = set; then
34 echo $ECHO_N "(cached) $ECHO_C" >&6
35 else
36 ac_path_GREP_found=false
37 # Loop through the user's path and test for each of PROGNAME-LIST
38 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
40 do
41 IFS=$as_save_IFS
42 test -z "$as_dir" && as_dir=.
43 for ac_prog in grep ggrep; do
44 for ac_exec_ext in '' $ac_executable_extensions; do
45 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
46 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
47 # Check for GNU ac_path_GREP and select it if it is found.
48 # Check for GNU $ac_path_GREP
49 case `"$ac_path_GREP" --version 2>&1` in
50 *GNU*)
51 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
52 *)
53 ac_count=0
54 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
55 while :
56 do
57 cat "conftest.in" "conftest.in" >"conftest.tmp"
58 mv "conftest.tmp" "conftest.in"
59 cp "conftest.in" "conftest.nl"
60 echo 'GREP' >> "conftest.nl"
61 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
62 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
63 ac_count=`expr $ac_count + 1`
64 if test $ac_count -gt ${ac_path_GREP_max-0}; then
65 # Best one so far, save it but keep looking for a better one
66 ac_cv_path_GREP="$ac_path_GREP"
67 ac_path_GREP_max=$ac_count
68 fi
69 # 10*(2^10) chars as input seems more than enough
70 test $ac_count -gt 10 && break
71 done
72 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
73 esac
74
75
76 $ac_path_GREP_found && break 3
77 done
78 done
79
80 done
81 IFS=$as_save_IFS
82
83
84 fi
85
86 GREP="$ac_cv_path_GREP"
87 if test -z "$GREP"; then
88 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
89 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
90 { (exit 1); exit 1; }; }
91 fi
92
93 else
94 ac_cv_path_GREP=$GREP
95 fi
96
97
98 fi
99 { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
100 echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
101 GREP="$ac_cv_path_GREP"
102
103
104 { echo "$as_me:$LINENO: checking for egrep" >&5
105 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
106 if test "${ac_cv_path_EGREP+set}" = set; then
107 echo $ECHO_N "(cached) $ECHO_C" >&6
108 else
109 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
110 then ac_cv_path_EGREP="$GREP -E"
111 else
112 # Extract the first word of "egrep" to use in msg output
113 if test -z "$EGREP"; then
114 set dummy egrep; ac_prog_name=$2
115 if test "${ac_cv_path_EGREP+set}" = set; then
116 echo $ECHO_N "(cached) $ECHO_C" >&6
117 else
118 ac_path_EGREP_found=false
119 # Loop through the user's path and test for each of PROGNAME-LIST
120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
121 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
122 do
123 IFS=$as_save_IFS
124 test -z "$as_dir" && as_dir=.
125 for ac_prog in egrep; do
126 for ac_exec_ext in '' $ac_executable_extensions; do
127 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
128 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
129 # Check for GNU ac_path_EGREP and select it if it is found.
130 # Check for GNU $ac_path_EGREP
131 case `"$ac_path_EGREP" --version 2>&1` in
132 *GNU*)
133 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
134 *)
135 ac_count=0
136 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
137 while :
138 do
139 cat "conftest.in" "conftest.in" >"conftest.tmp"
140 mv "conftest.tmp" "conftest.in"
141 cp "conftest.in" "conftest.nl"
142 echo 'EGREP' >> "conftest.nl"
143 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
144 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
145 ac_count=`expr $ac_count + 1`
146 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
147 # Best one so far, save it but keep looking for a better one
148 ac_cv_path_EGREP="$ac_path_EGREP"
149 ac_path_EGREP_max=$ac_count
150 fi
151 # 10*(2^10) chars as input seems more than enough
152 test $ac_count -gt 10 && break
153 done
154 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
155 esac
156
157
158 $ac_path_EGREP_found && break 3
159 done
160 done
161
162 done
163 IFS=$as_save_IFS
164
165
166 fi
167
168 EGREP="$ac_cv_path_EGREP"
169 if test -z "$EGREP"; then
170 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
171 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
172 { (exit 1); exit 1; }; }
173 fi
174
175 else
176 ac_cv_path_EGREP=$EGREP
177 fi
178
179
180 fi
181 fi
182 { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
183 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
184 EGREP="$ac_cv_path_EGREP"
185
186
187 { echo "$as_me:$LINENO: checking installed Linux kernel header files" >&5
188 echo $ECHO_N "checking installed Linux kernel header files... $ECHO_C" >&6; }
189 if test "${libc_cv_linux2010+set}" = set; then
190 echo $ECHO_N "(cached) $ECHO_C" >&6
191 else
192 cat >conftest.$ac_ext <<_ACEOF
193 /* confdefs.h. */
194 _ACEOF
195 cat confdefs.h >>conftest.$ac_ext
196 cat >>conftest.$ac_ext <<_ACEOF
197 /* end confdefs.h. */
198 #include <linux/version.h>
199 #if !defined LINUX_VERSION_CODE || LINUX_VERSION_CODE < (2 *65536+ 0 *256+ 10) /* 2.0.10 */
200 eat flaming death
201 #endif
202 _ACEOF
203 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
204 $EGREP "eat flaming death" >/dev/null 2>&1; then
205 libc_cv_linux2010='TOO OLD!'
206 else
207 libc_cv_linux2010='2.0.10 or later'
208 fi
209 rm -f conftest*
210
211 fi
212 { echo "$as_me:$LINENO: result: $libc_cv_linux2010" >&5
213 echo "${ECHO_T}$libc_cv_linux2010" >&6; }
214 if test "$libc_cv_linux2010" != '2.0.10 or later'; then
215 { { echo "$as_me:$LINENO: error: GNU libc requires kernel header files from
216 Linux 2.0.10 or later to be installed before configuring.
217 The kernel header files are found usually in /usr/include/asm and
218 /usr/include/linux; make sure these directories use files from
219 Linux 2.0.10 or later. This check uses <linux/version.h>, so
220 make sure that file was built correctly when installing the kernel header
221 files. To use kernel headers not from /usr/include/linux, use the
222 configure option --with-headers." >&5
223 echo "$as_me: error: GNU libc requires kernel header files from
224 Linux 2.0.10 or later to be installed before configuring.
225 The kernel header files are found usually in /usr/include/asm and
226 /usr/include/linux; make sure these directories use files from
227 Linux 2.0.10 or later. This check uses <linux/version.h>, so
228 make sure that file was built correctly when installing the kernel header
229 files. To use kernel headers not from /usr/include/linux, use the
230 configure option --with-headers." >&2;}
231 { (exit 1); exit 1; }; }
232 fi
233
234 # If the user gave a minimal version number test whether the available
235 # kernel headers are young enough. Additionally we have minimal
236 # kernel versions for some architectures. If a previous configure fragment
237 # set arch_minimum_kernel already, let that override our defaults here.
238 # Note that we presume such a fragment has set libc_cv_gcc_unwind_find_fde
239 # if appropriate too.
240 test -n "$arch_minimum_kernel" ||
241 case "$machine" in
242 alpha*)
243 arch_minimum_kernel=2.1.100
244 libc_cv_gcc_unwind_find_fde=yes
245 ;;
246 arm*)
247 arch_minimum_kernel=2.0.10
248 libc_cv_gcc_unwind_find_fde=yes
249 ;;
250 i386*)
251 libc_cv_gcc_unwind_find_fde=yes
252 arch_minimum_kernel=2.0.10
253 ;;
254 ia64*)
255 arch_minimum_kernel=2.4.0
256 ;;
257 hppa*)
258 libc_cv_gcc_unwind_find_fde=yes
259 arch_minimum_kernel=2.4.19
260 ;;
261 m68k*)
262 arch_minimum_kernel=2.0.10
263 libc_cv_gcc_unwind_find_fde=yes
264 ;;
265 powerpc/powerpc32)
266 libc_cv_gcc_unwind_find_fde=yes
267 arch_minimum_kernel=2.0.10
268 ;;
269 powerpc/powerpc64)
270 arch_minimum_kernel=2.4.21
271 ;;
272 s390/s390-32)
273 libc_cv_gcc_unwind_find_fde=yes
274 arch_minimum_kernel=2.2.10
275 ;;
276 s390/s390-64)
277 libc_cv_gcc_unwind_find_fde=yes
278 arch_minimum_kernel=2.4.0
279 ;;
280 sh*)
281 arch_minimum_kernel=2.3.99
282 libc_cv_gcc_unwind_find_fde=yes
283 ;;
284 sparc/sparc64*)
285 libc_cv_gcc_unwind_find_fde=yes
286 arch_minimum_kernel=2.4.21
287 ;;
288 sparc*)
289 libc_cv_gcc_unwind_find_fde=yes
290 arch_minimum_kernel=2.0.10
291 ;;
292 x86_64*)
293 arch_minimum_kernel=2.4.0
294 ;;
295 *)
296 arch_minimum_kernel=2.0.10
297 ;;
298 esac
299 if test -n "$minimum_kernel"; then
300
301 user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
302 arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
303
304 if test $user_version -lt $arch_version; then
305 { echo "$as_me:$LINENO: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
306 echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
307 minimum_kernel=$arch_minimum_kernel
308 fi
309 else
310 if test $arch_minimum_kernel != '2.0.10'; then
311 minimum_kernel=$arch_minimum_kernel
312 fi
313 fi
314
315 if test -n "$minimum_kernel"; then
316 { echo "$as_me:$LINENO: checking for kernel header at least $minimum_kernel" >&5
317 echo $ECHO_N "checking for kernel header at least $minimum_kernel... $ECHO_C" >&6; }
318 decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
319 abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
320 cat >conftest.$ac_ext <<_ACEOF
321 /* confdefs.h. */
322 _ACEOF
323 cat confdefs.h >>conftest.$ac_ext
324 cat >>conftest.$ac_ext <<_ACEOF
325 /* end confdefs.h. */
326 #include <linux/version.h>
327 #if LINUX_VERSION_CODE < $decnum
328 eat flaming death
329 #endif
330 _ACEOF
331 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
332 $EGREP "eat flaming death" >/dev/null 2>&1; then
333 libc_minimum_kernel='too old!'
334 else
335 libc_minimum_kernel=ok
336 fi
337 rm -f conftest*
338
339 { echo "$as_me:$LINENO: result: $libc_minimum_kernel" >&5
340 echo "${ECHO_T}$libc_minimum_kernel" >&6; }
341 if test "$libc_minimum_kernel" = ok; then
342 cat >>confdefs.h <<_ACEOF
343 #define __LINUX_KERNEL_VERSION $decnum
344 _ACEOF
345
346 cat >>confdefs.h <<_ACEOF
347 #define __ABI_TAG_VERSION $abinum
348 _ACEOF
349
350 else
351 { { echo "$as_me:$LINENO: error: *** The available kernel headers are older than the requested
352 *** compatible kernel version" >&5
353 echo "$as_me: error: *** The available kernel headers are older than the requested
354 *** compatible kernel version" >&2;}
355 { (exit 1); exit 1; }; }
356 fi
357 fi
358
359 # The result of the above test for the use of the FDE code is invalid if
360 # the user overrides the decision about the minimum ABI.
361 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
362 libc_cv_gcc_unwind_find_fde=no
363 fi
364
365 if test -n "$sysheaders"; then
366 CPPFLAGS=$OLD_CPPFLAGS
367 fi
368 # The Linux filesystem standard prescribes where to place "essential"
369 # files. I.e., when the installation prefix is "/usr" we have to place
370 # shared library objects and the configuration files on the root partition
371 # in /lib and /etc.
372 case "$prefix" in
373 /usr | /usr/)
374 # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib.
375 # Allow earlier configure scripts to handle libc_cv_slibdir, libdir,
376 # and libc_cv_localedir.
377 test -n "$libc_cv_slibdir" || \
378 case $machine in
379 sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64)
380 libc_cv_slibdir="/lib64"
381 if test "$libdir" = '${exec_prefix}/lib'; then
382 libdir='${exec_prefix}/lib64';
383 # Locale data can be shared between 32bit and 64bit libraries
384 libc_cv_localedir='${exec_prefix}/lib/locale'
385 fi
386 ;;
387 *)
388 libc_cv_slibdir="/lib"
389 ;;
390 esac
391 # Allow the user to override the path with --sysconfdir
392 if test $sysconfdir = '${prefix}/etc'; then
393 libc_cv_sysconfdir=/etc
394 else
395 libc_cv_sysconfdir=$sysconfdir
396 fi
397 libc_cv_rootsbindir="/sbin"
398 ;;
399 esac
400
401 # Under Linux the NPTL add-on should be available.
402 case $add_ons in
403 # It is available. Good.
404 *nptl*)
405 nptl_missing=
406 ;;
407 *)
408 nptl_missing=yes
409 ;;
410 esac
411
412 if test "$nptl_missing"; then
413 if test $enable_sanity = yes; then
414 echo "\
415 *** On GNU/Linux systems it is normal to compile GNU libc with the
416 *** \`nptl' add-on. Without that, the library will be
417 *** incompatible with normal GNU/Linux systems.
418 *** If you really mean to not use this add-on, run configure again
419 *** using the extra parameter \`--disable-sanity-checks'."
420 exit 1
421 else
422 echo "\
423 *** WARNING: Are you sure you do not want to use the \`nptl'
424 *** add-on?"
425 fi
426 fi
427
428 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
429 if test $enable_sanity = yes; then
430 echo "\
431 *** On GNU/Linux systems the GNU C Library should not be installed into
432 *** /usr/local since this might make your system totally unusable.
433 *** We strongly advise to use a different prefix. For details read the FAQ.
434 *** If you really mean to do this, run configure again using the extra
435 *** parameter \`--disable-sanity-checks'."
436 exit 1
437 else
438 echo "\
439 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
440 *** This might make your system totally unusable, for details read the FAQ."
441 fi
442 fi
443
444
445 # One Linux we use ldconfig.
446 use_ldconfig=yes
447
448 # We need some extensions to the `ldd' script.
449
450 case "$machine" in
451 i[3456]86* | m68*)
452 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
453 ;;
454 ia64*)
455 ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
456 ;;
457 s390*)
458 ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
459 ;;
460 sparc*)
461 ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
462 ;;
463 x86_64*)
464 ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
465 ;;
466 powerpc*)
467 ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
468 ;;
469 *)
470 ;;
471 esac
472
473
474 if test $host = $build; then
475 # If $prefix/include/{net,scsi} are symlinks, make install will
476 # clobber what they're linked to (probably a kernel tree).
477 # test -L ought to work on all Linux boxes.
478 if test "x$prefix" != xNONE; then
479 ac_prefix=$prefix
480 else
481 ac_prefix=$ac_default_prefix
482 fi
483 { echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
484 echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6; }
485 ac_message=
486 if test -L ${ac_prefix}/include/net; then
487 ac_message="$ac_message
488 ${ac_prefix}/include/net is a symlink"
489 fi
490 if test -L ${ac_prefix}/include/scsi; then
491 ac_message="$ac_message
492 ${ac_prefix}/include/scsi is a symlink"
493 fi
494 if test -n "$ac_message"; then
495 { { echo "$as_me:$LINENO: error: $ac_message
496 \`make install' will destroy the target of the link(s).
497 Delete the links and re-run configure, or better still, move the entire
498 ${ac_prefix}/include directory out of the way." >&5
499 echo "$as_me: error: $ac_message
500 \`make install' will destroy the target of the link(s).
501 Delete the links and re-run configure, or better still, move the entire
502 ${ac_prefix}/include directory out of the way." >&2;}
503 { (exit 1); exit 1; }; }
504 else
505 { echo "$as_me:$LINENO: result: ok" >&5
506 echo "${ECHO_T}ok" >&6; }
507 fi
508 fi
509
510 # We have inlined syscalls.
511 cat >>confdefs.h <<\_ACEOF
512 #define HAVE_INLINED_SYSCALLS 1
513 _ACEOF
514