1 # Check if the function is available.
2 # HAVE_XXX will be defined if yes.
4 # $1: the name of function
5 # $2: the headers in where the function declared
6 AC_DEFUN([AX_CHECK_DECL_EX], [dnl
7 AS_IF([test "x$2" = "x"], [AC_MSG_ERROR([header not privided])])
8 AS_VAR_PUSHDEF([have_func_var], [HAVE_[]m4_toupper($1)])
10 [AC_DEFINE([have_func_var], [1], [Define to 1 if you have the `$1' function.])],,dnl
13 AS_VAR_POPDEF([have_func_var])dnl
16 AC_DEFUN([AX_CHECK_DECLS_EX], [dnl
17 AS_IF([test "x$2" = "x"], [AC_MSG_ERROR([header not privided])])
19 m4_split(m4_normalize($1)),dnl
20 [AX_CHECK_DECL_EX([decl], [$2])]dnl