3 dnl AC_CHECK_VAR(includes, variable)
4 AC_DEFUN(AC_CHECK_VAR, [
5 AC_MSG_CHECKING(for $2)
6 AC_CACHE_VAL(ac_cv_var_$2, [
7 AC_TRY_LINK([extern int $2;
8 int foo() { return $2; }],
10 ac_cv_var_$2=yes, ac_cv_var_$2=no)
12 define([foo], [HAVE_]translit($2, [a-z], [A-Z]))
14 AC_MSG_RESULT(`eval echo \\$ac_cv_var_$2`)
15 if test `eval echo \\$ac_cv_var_$2` = yes; then
16 AC_DEFINE_UNQUOTED(foo, 1, [define if you have $2])
17 AC_CHECK_DECLARATION([$1],[$2])