Updated to fedora-glibc-20060217T1609
[glibc.git] / sysdeps / unix / sysv / linux / configure
blob06683089ada69be3c77f2f3223f2a1be64322d93
1 # This file is generated from configure.in by Autoconf.  DO NOT EDIT!
2  # Local configure fragment for sysdeps/unix/sysv/linux.
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"
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
19 if test -n "$sysheaders"; then
20   OLD_CPPFLAGS=$CPPFLAGS
21   CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
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
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
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'
62 rm -f conftest*
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; }; }
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   mips*)
119     arch_minimum_kernel=2.4.0
120     libc_cv_gcc_unwind_find_fde=yes
121     ;;
122   powerpc/powerpc32)
123     libc_cv_gcc_unwind_find_fde=yes
124     arch_minimum_kernel=2.0.10
125     ;;
126   powerpc/powerpc64)
127     arch_minimum_kernel=2.4.19
128     ;;
129   s390/s390-32)
130     libc_cv_gcc_unwind_find_fde=yes
131     arch_minimum_kernel=2.2.10
132     ;;
133   s390/s390-64)
134     libc_cv_gcc_unwind_find_fde=yes
135     arch_minimum_kernel=2.4.0
136     ;;
137   sh*)
138     arch_minimum_kernel=2.3.99
139     libc_cv_gcc_unwind_find_fde=yes
140     ;;
141   sparc/sparc64*)
142     libc_cv_gcc_unwind_find_fde=yes
143     arch_minimum_kernel=2.4.21
144     ;;
145   sparc*)
146     libc_cv_gcc_unwind_find_fde=yes
147     arch_minimum_kernel=2.0.10
148     ;;
149   x86_64*)
150     arch_minimum_kernel=2.4.0
151     ;;
152   *)
153     arch_minimum_kernel=2.0.10
154     ;;
155 esac
156 if test -n "$minimum_kernel"; then
158   user_version=$((`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
159   arch_version=$((`echo "$arch_minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1 \* 65536 + \2 \* 256 + \3/'`))
161   if test $user_version -lt $arch_version; then
162     { echo "$as_me:$LINENO: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&5
163 echo "$as_me: WARNING: minimum kernel version reset to $arch_minimum_kernel" >&2;}
164     minimum_kernel=$arch_minimum_kernel
165   fi
166 else
167   if test $arch_minimum_kernel != '2.0.10'; then
168     minimum_kernel=$arch_minimum_kernel
169   fi
172 if test -n "$minimum_kernel"; then
173   echo "$as_me:$LINENO: checking for kernel header at least $minimum_kernel" >&5
174 echo $ECHO_N "checking for kernel header at least $minimum_kernel... $ECHO_C" >&6
175   decnum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/(\1 * 65536 + \2 * 256 + \3)/'`;
176   abinum=`echo "$minimum_kernel.0.0.0" | sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1,\2,\3/'`;
177   cat >conftest.$ac_ext <<_ACEOF
178 /* confdefs.h.  */
179 _ACEOF
180 cat confdefs.h >>conftest.$ac_ext
181 cat >>conftest.$ac_ext <<_ACEOF
182 /* end confdefs.h.  */
183 #include <linux/version.h>
184 #if LINUX_VERSION_CODE < $decnum
185 eat flaming death
186 #endif
187 _ACEOF
188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
189   $EGREP "eat flaming death" >/dev/null 2>&1; then
190   libc_minimum_kernel='too old!'
191 else
192   libc_minimum_kernel=ok
194 rm -f conftest*
196   echo "$as_me:$LINENO: result: $libc_minimum_kernel" >&5
197 echo "${ECHO_T}$libc_minimum_kernel" >&6
198   if test "$libc_minimum_kernel" = ok; then
199     cat >>confdefs.h <<_ACEOF
200 #define __LINUX_KERNEL_VERSION $decnum
201 _ACEOF
203     cat >>confdefs.h <<_ACEOF
204 #define __ABI_TAG_VERSION $abinum
205 _ACEOF
207   else
208     { { echo "$as_me:$LINENO: error: *** The available kernel headers are older than the requested
209 *** compatible kernel version" >&5
210 echo "$as_me: error: *** The available kernel headers are older than the requested
211 *** compatible kernel version" >&2;}
212    { (exit 1); exit 1; }; }
213   fi
216 # The result of the above test for the use of the FDE code is invalid if
217 # the user overrides the decision about the minimum ABI.
218 if test "$oldest_abi" != default && test "2.2.4" \< "$oldest_abi"; then
219   libc_cv_gcc_unwind_find_fde=no
222 if test -n "$sysheaders"; then
223   CPPFLAGS=$OLD_CPPFLAGS
225 # The Linux filesystem standard prescribes where to place "essential"
226 # files.  I.e., when the installation prefix is "/usr" we have to place
227 # shared library objects and the configuration files on the root partition
228 # in /lib and /etc.
229 case "$prefix" in
230 /usr | /usr/)
231   # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib
232   case $machine in
233   sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
234   mips/mips64/n64/* )
235     libc_cv_slibdir="/lib64"
236     if test "$libdir" = '${exec_prefix}/lib'; then
237       libdir='${exec_prefix}/lib64';
238       # Locale data can be shared between 32bit and 64bit libraries
239       libc_cv_localedir='${exec_prefix}/lib/locale'
240     fi
241     ;;
242   mips/mips64/n32/* )
243     libc_cv_slibdir="/lib32"
244     if test "$libdir" = '${exec_prefix}/lib'; then
245       libdir='${exec_prefix}/lib32';
246       # Locale data can be shared between 32bit and 64bit libraries
247       libc_cv_localedir='${exec_prefix}/lib/locale'
248     fi
249     ;;
250   *)
251     libc_cv_slibdir="/lib"
252     ;;
253   esac
254   # Allow the user to override the path with --sysconfdir
255   if test $sysconfdir = '${prefix}/etc'; then
256     libc_cv_sysconfdir=/etc
257   else
258     libc_cv_sysconfdir=$sysconfdir
259    fi
260   libc_cv_rootsbindir="/sbin"
261   ;;
262 esac
264 # Under Linux the NPTL add-on should be available.
265 case $add_ons in
266   # It is available.  Good.
267   *nptl*)
268     nptl_missing=
269     ;;
270   *)
271     nptl_missing=yes
272     ;;
273 esac
275 if test "$nptl_missing"; then
276   if test $enable_sanity = yes; then
277     echo "\
278 *** On GNU/Linux systems it is normal to compile GNU libc with the
279 *** \`nptl' add-on.  Without that, the library will be
280 *** incompatible with normal GNU/Linux systems.
281 *** If you really mean to not use this add-on, run configure again
282 *** using the extra parameter \`--disable-sanity-checks'."
283     exit 1
284   else
285     echo "\
286 *** WARNING: Are you sure you do not want to use the \`nptl'
287 *** add-on?"
288   fi
291 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
292   if test $enable_sanity = yes; then
293     echo "\
294 *** On GNU/Linux systems the GNU C Library should not be installed into
295 *** /usr/local since this might make your system totally unusable.
296 *** We strongly advise to use a different prefix.  For details read the FAQ.
297 *** If you really mean to do this, run configure again using the extra
298 *** parameter \`--disable-sanity-checks'."
299     exit 1
300   else
301     echo "\
302 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
303 *** This might make your system totally unusable, for details read the FAQ."
304   fi
308 # One Linux we use ldconfig.
309 use_ldconfig=yes
311 # We need some extensions to the `ldd' script.
313 case "$machine" in
314   i[3456]86* | m68*)
315     ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
316     ;;
317   ia64*)
318     ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
319     ;;
320   mips/*64*)
321     ldd_rewrite_script=../sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
322     ;;
323   s390*)
324     ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
325     ;;
326   sparc*)
327     ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
328     ;;
329   x86_64*)
330     ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
331     ;;
332   powerpc*)
333     ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
334     ;;
335   *)
336     ;;
337 esac
340 if test $host = $build; then
341   # If $prefix/include/{net,scsi} are symlinks, make install will
342   # clobber what they're linked to (probably a kernel tree).
343   # test -L ought to work on all Linux boxes.
344   if test "x$prefix" != xNONE; then
345     ac_prefix=$prefix
346   else
347     ac_prefix=$ac_default_prefix
348   fi
349   echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
350 echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6
351   ac_message=
352   if test -L ${ac_prefix}/include/net; then
353     ac_message="$ac_message
354    ${ac_prefix}/include/net is a symlink"
355   fi
356   if test -L ${ac_prefix}/include/scsi; then
357     ac_message="$ac_message
358    ${ac_prefix}/include/scsi is a symlink"
359   fi
360   if test -n "$ac_message"; then
361     { { echo "$as_me:$LINENO: error: $ac_message
362 \`make install' will destroy the target of the link(s).
363 Delete the links and re-run configure, or better still, move the entire
364 ${ac_prefix}/include directory out of the way." >&5
365 echo "$as_me: error: $ac_message
366 \`make install' will destroy the target of the link(s).
367 Delete the links and re-run configure, or better still, move the entire
368 ${ac_prefix}/include directory out of the way." >&2;}
369    { (exit 1); exit 1; }; }
370   else
371     echo "$as_me:$LINENO: result: ok" >&5
372 echo "${ECHO_T}ok" >&6
373   fi
376 # We have inlined syscalls.
377 cat >>confdefs.h <<\_ACEOF
378 #define HAVE_INLINED_SYSCALLS 1
379 _ACEOF