Update.
[glibc.git] / sysdeps / unix / configure
blob0acc2277b090c1f02016063e9b01328ea7d26a81
1  # Local configure fragment for sysdeps/unix.
3 if test -z "$inhibit_glue"; then
4 # For make_errlist.c, used in make_errlist.
5 for ac_func in strerror
6 do
7 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
8 echo "configure:9: checking for $ac_func" >&5
9 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10   echo $ac_n "(cached) $ac_c" 1>&6
11 else
12   cat > conftest.$ac_ext <<EOF
13 #line 14 "configure"
14 #include "confdefs.h"
15 /* System header to define __stub macros and hopefully few prototypes,
16     which can conflict with char $ac_func(); below.  */
17 #include <assert.h>
18 /* Override any gcc2 internal prototype to avoid an error.  */
19 /* We use char because int might match the return type of a gcc2
20     builtin and then its argument prototype would still apply.  */
21 char $ac_func();
22 char (*f)();
24 int main() {
26 /* The GNU C library defines this for functions which it implements
27     to always fail with ENOSYS.  Some functions are actually named
28     something starting with __ and the normal name is an alias.  */
29 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
30 choke me
31 #else
32 f = $ac_func;
33 #endif
35 ; return 0; }
36 EOF
37 if { (eval echo configure:38: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
38   rm -rf conftest*
39   eval "ac_cv_func_$ac_func=yes"
40 else
41   echo "configure: failed program was:" >&5
42   cat conftest.$ac_ext >&5
43   rm -rf conftest*
44   eval "ac_cv_func_$ac_func=no"
46 rm -f conftest*
49 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
50   echo "$ac_t""yes" 1>&6
51     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52   cat >> confdefs.h <<EOF
53 #define $ac_tr_func 1
54 EOF
56 else
57   echo "$ac_t""no" 1>&6
59 done