Updated to fedora-glibc-20041110T0839
[glibc.git] / sysdeps / unix / sysv / linux / configure
blobd0591433962fb8c54d194ec540715e8ff605be33
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*)
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
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/'`))
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
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
190 rm -f conftest*
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
199     cat >>confdefs.h <<_ACEOF
200 #define __ABI_TAG_VERSION $abinum
201 _ACEOF
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
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
218 if test -n "$sysheaders"; then
219   CPPFLAGS=$OLD_CPPFLAGS
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   case $machine in
229   sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \
230   mips/mips64/n64/* )
231     libc_cv_slibdir="/lib64"
232     if test "$libdir" = '${exec_prefix}/lib'; then
233       libdir='${exec_prefix}/lib64';
234       # Locale data can be shared between 32bit and 64bit libraries
235       libc_cv_localedir='${exec_prefix}/lib/locale'
236     fi
237     ;;
238   mips/mips64/n32/* )
239     libc_cv_slibdir="/lib32"
240     if test "$libdir" = '${exec_prefix}/lib'; then
241       libdir='${exec_prefix}/lib32';
242       # Locale data can be shared between 32bit and 64bit libraries
243       libc_cv_localedir='${exec_prefix}/lib/locale'
244     fi
245     ;;
246   *)
247     libc_cv_slibdir="/lib"
248     ;;
249   esac
250   # Allow the user to override the path with --sysconfdir
251   if test $sysconfdir = '${prefix}/etc'; then
252     libc_cv_sysconfdir=/etc
253   else
254     libc_cv_sysconfdir=$sysconfdir
255    fi
256   libc_cv_rootsbindir="/sbin"
257   ;;
258 esac
260 # Under Linux the LinuxThreads or NPTL add-on should be available.
261 case $add_ons in
262   # Only one of the add-ons should be available.
263   *linuxthreads*nptl*|*nptl*linuxthreads*)
264     echo "\
265 *** LinuxThreads and NPTL add-ons are both available.  Only one must be used."
266     exit 1
267     ;;
268   # It is available.  Good.
269   *linuxthreads*)
270     linuxthreads_missing=
271     ;;
272   *nptl*)
273     linuxthreads_missing=
274     ;;
275   *)
276     linuxthreads_missing=yes
277     ;;
278 esac
280 if test "$linuxthreads_missing"; then
281   if test $enable_sanity = yes; then
282     echo "\
283 *** On GNU/Linux systems it is normal to compile GNU libc with the
284 *** \`linuxthreads' add-on.  Without that, the library will be
285 *** incompatible with normal GNU/Linux systems.
286 *** If you really mean to not use this add-on, run configure again
287 *** using the extra parameter \`--disable-sanity-checks'."
288     exit 1
289   else
290     echo "\
291 *** WARNING: Are you sure you do not want to use the \`linuxthreads'
292 *** add-on?"
293   fi
296 if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
297   if test $enable_sanity = yes; then
298     echo "\
299 *** On GNU/Linux systems the GNU C Library should not be installed into
300 *** /usr/local since this might make your system totally unusable.
301 *** We strongly advise to use a different prefix.  For details read the FAQ.
302 *** If you really mean to do this, run configure again using the extra
303 *** parameter \`--disable-sanity-checks'."
304     exit 1
305   else
306     echo "\
307 *** WARNING: Do you really want to install the GNU C Library into /usr/local?
308 *** This might make your system totally unusable, for details read the FAQ."
309   fi
313 # One Linux we use ldconfig.
314 use_ldconfig=yes
316 # We need some extensions to the `ldd' script.
318 case "$machine" in
319   i[3456]86* | m68*)
320     ldd_rewrite_script=../sysdeps/unix/sysv/linux/ldd-rewrite.sed
321     ;;
322   ia64*)
323     ldd_rewrite_script=../sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed
324     ;;
325   mips/*64*)
326     ldd_rewrite_script=../sysdeps/unix/sysv/linux/mips/mips64/ldd-rewrite.sed
327     ;;
328   s390*)
329     ldd_rewrite_script=../sysdeps/unix/sysv/linux/s390/ldd-rewrite.sed
330     ;;
331   sparc*)
332     ldd_rewrite_script=../sysdeps/unix/sysv/linux/sparc/ldd-rewrite.sed
333     ;;
334   x86_64*)
335     ldd_rewrite_script=../sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed
336     ;;
337   powerpc*)
338     ldd_rewrite_script=../sysdeps/unix/sysv/linux/powerpc/ldd-rewrite.sed
339     ;;
340   *)
341     ;;
342 esac
345 if test $host = $build; then
346   # If $prefix/include/{net,scsi} are symlinks, make install will
347   # clobber what they're linked to (probably a kernel tree).
348   # test -L ought to work on all Linux boxes.
349   if test "x$prefix" != xNONE; then
350     ac_prefix=$prefix
351   else
352     ac_prefix=$ac_default_prefix
353   fi
354   echo "$as_me:$LINENO: checking for symlinks in ${ac_prefix}/include" >&5
355 echo $ECHO_N "checking for symlinks in ${ac_prefix}/include... $ECHO_C" >&6
356   ac_message=
357   if test -L ${ac_prefix}/include/net; then
358     ac_message="$ac_message
359    ${ac_prefix}/include/net is a symlink"
360   fi
361   if test -L ${ac_prefix}/include/scsi; then
362     ac_message="$ac_message
363    ${ac_prefix}/include/scsi is a symlink"
364   fi
365   if test -n "$ac_message"; then
366     { { echo "$as_me:$LINENO: error: $ac_message
367 \`make install' will destroy the target of the link(s).
368 Delete the links and re-run configure, or better still, move the entire
369 ${ac_prefix}/include directory out of the way." >&5
370 echo "$as_me: error: $ac_message
371 \`make install' will destroy the target of the link(s).
372 Delete the links and re-run configure, or better still, move the entire
373 ${ac_prefix}/include directory out of the way." >&2;}
374    { (exit 1); exit 1; }; }
375   else
376     echo "$as_me:$LINENO: result: ok" >&5
377 echo "${ECHO_T}ok" >&6
378   fi
381 # We have inlined syscalls.
382 cat >>confdefs.h <<\_ACEOF
383 #define HAVE_INLINED_SYSCALLS 1
384 _ACEOF