Added a check button for NNTP authentication to account preferences.
[claws.git] / ac / sv-check-type.m4
1 dnl sv_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES])
2 dnl
3 dnl Like AC_CHECK_TYPE, but in addition to `sys/types.h', `stdlib.h' and
4 dnl `stddef.h' checks files included by INCLUDES, which should be a
5 dnl series of #include statements.  If TYPE is not defined, define it
6 dnl to DEFAULT.
7 dnl
8 AC_DEFUN(sv_CHECK_TYPE,
9 [AC_REQUIRE([AC_HEADER_STDC])dnl
10 AC_MSG_CHECKING(for $1)
11 AC_CACHE_VAL(sv_cv_type_$1,
12 [AC_TRY_COMPILE([
13 #include <sys/types.h>
14 #if STDC_HEADERS
15 #include <stdlib.h>
16 #include <stddef.h>
17 #endif
18 $3
19 ], [
20 #undef $1
21 int a = sizeof($1);
22 ], sv_cv_type_$1=yes, sv_cv_type_$1=no)])dnl
23 AC_MSG_RESULT($sv_cv_type_$1)
24 if test $sv_cv_type_$1 = no; then
25   AC_DEFINE($1, $2)
26 fi
27 ])