Update.
[platform/upstream/glibc.git] / sysdeps / unix / configure
1  # Local configure fragment for sysdeps/unix.
2
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 \"`echo '$''{'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
23 int main() {
24
25 /* The GNU C library defines this for functions which it implements
26     to always fail with ENOSYS.  Some functions are actually named
27     something starting with __ and the normal name is an alias.  */
28 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
29 choke me
30 #else
31 $ac_func();
32 #endif
33
34 ; return 0; }
35 EOF
36 if { (eval echo configure:37: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
37   rm -rf conftest*
38   eval "ac_cv_func_$ac_func=yes"
39 else
40   echo "configure: failed program was:" >&5
41   cat conftest.$ac_ext >&5
42   rm -rf conftest*
43   eval "ac_cv_func_$ac_func=no"
44 fi
45 rm -f conftest*
46 fi
47
48 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
49   echo "$ac_t""yes" 1>&6
50     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51   cat >> confdefs.h <<EOF
52 #define $ac_tr_func 1
53 EOF
54  
55 else
56   echo "$ac_t""no" 1>&6
57 fi
58 done
59
60 fi