2004-09-07 14:56:14 +08:00
|
|
|
dnl AC_SINGLE_CXX_CHECK(DEFINEVAR, CACHEVAR, FUNCTION, HEADER, PROGRAM)
|
|
|
|
dnl $1, $2, $3, $4, $5
|
|
|
|
dnl
|
|
|
|
AC_DEFUN([AC_SINGLE_CXX_CHECK],
|
|
|
|
[AC_CACHE_CHECK([for $3 in $4], [$2],
|
2004-09-20 06:31:49 +08:00
|
|
|
[AC_LANG_PUSH([C++])
|
2004-09-07 14:56:14 +08:00
|
|
|
AC_COMPILE_IFELSE(AC_LANG_SOURCE([$5]),[$2=yes],[$2=no])
|
2004-09-20 06:31:49 +08:00
|
|
|
AC_LANG_POP([C++])])
|
2004-09-07 14:56:14 +08:00
|
|
|
if test "$$2" = "yes"
|
|
|
|
then
|
|
|
|
AC_DEFINE($1, 1, [Define to 1 if your compiler defines $3 in the $4
|
|
|
|
header file.])
|
|
|
|
fi])
|
|
|
|
|