1 dnl ######################################################################
2 dnl find if "extern char *sys_errlist[]" exist in headers
3 AC_DEFUN([AMU_EXTERN_SYS_ERRLIST],
5 AC_CACHE_CHECK(if external definition for sys_errlist[] exists,
6 ac_cv_extern_sys_errlist,
8 # try to locate pattern in header files
9 #pattern="(extern)?.*char.*sys_errlist.*\[\]"
10 pattern="(extern)?.*char.*sys_errlist.*"
11 AC_EGREP_CPP(${pattern},
15 #endif /* HAVE_STDIO_H */
16 #ifdef HAVE_SYS_ERRNO_H
17 # include <sys/errno.h>
18 #endif /* HAVE_SYS_ERRNO_H */
21 #endif /* HAVE_ERRNO_H */
22 ], ac_cv_extern_sys_errlist=yes, ac_cv_extern_sys_errlist=no)
24 # check if need to define variable
25 if test "$ac_cv_extern_sys_errlist" = yes
27 AC_DEFINE(HAVE_EXTERN_SYS_ERRLIST)
30 dnl ======================================================================