1 # Check if a given macro is defined in a certain header.
3 # AST_C_DEFINE_CHECK([package], [macro name], [header file], [version])
4 AC_DEFUN([AST_C_DEFINE_CHECK],
6 if test "x${PBX_$1}" != "x1"; then
7 AC_MSG_CHECKING([for $2 in $3])
8 saved_cppflags="${CPPFLAGS}"
9 if test "x${$1_DIR}" != "x"; then
10 $1_INCLUDE="-I${$1_DIR}/include"
12 CPPFLAGS="${CPPFLAGS} ${$1_INCLUDE}"
15 [ AC_LANG_PROGRAM( [#include <$3>],
25 AC_DEFINE([HAVE_$1], 1, [Define if your system has the $1 headers.])
26 m4_ifval([$4], [AC_DEFINE([HAVE_$1_VERSION], $4, [Define $1 headers version])])
30 CPPFLAGS="${saved_cppflags}"