-
-
-dnl gt_CHECK_DECL(FUNC, INCLUDES)
-dnl Check whether a function is declared.
-AC_DEFUN([gt_CHECK_DECL],
-[
- AC_CACHE_CHECK([whether $1 is declared], [ac_cv_have_decl_$1],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[$2]],
- [[
-#ifndef $1
- char *p = (char *) $1;
-#endif
- ]])],
- [ac_cv_have_decl_$1=yes],
- [ac_cv_have_decl_$1=no])])
- if test $ac_cv_have_decl_$1 = yes; then
- gt_value=1
- else
- gt_value=0
- fi
- AC_DEFINE_UNQUOTED([HAVE_DECL_]m4_translit($1, [a-z], [A-Z]), [$gt_value],
- [Define to 1 if you have the declaration of '$1', and to 0 if you don't.])
-])