]> Dogcows Code - chaz/tar/blob - m4/decl.m4
(xheader_set_single_keyword): Fix typo.
[chaz/tar] / m4 / decl.m4
1 #serial 5
2
3 AC_DEFUN(jm_CHECK_DECLARATION,
4 [
5 AC_MSG_CHECKING([whether $1 is declared])
6 AC_CACHE_VAL(jm_cv_func_decl_$1,
7 [AC_TRY_COMPILE($2,
8 [
9 #ifndef $1
10 char *(*pfn) = (char *(*)) $1
11 #endif
12 ],
13 eval "jm_cv_func_decl_$1=yes",
14 eval "jm_cv_func_decl_$1=no")])
15
16 if eval "test \"`echo '$jm_cv_func_decl_'$1`\" = yes"; then
17 AC_MSG_RESULT(yes)
18 ifelse([$3], , :, [$3])
19 else
20 AC_MSG_RESULT(no)
21 ifelse([$4], , , [$4
22 ])dnl
23 fi
24 ])dnl
25
26 dnl jm_CHECK_DECLARATIONS(INCLUDES, FUNCTION... [, ACTION-IF-DECLARED
27 dnl [, ACTION-IF-NOT-DECLARED]])
28 AC_DEFUN(jm_CHECK_DECLARATIONS,
29 [
30 for jm_func in $2
31 do
32 jm_CHECK_DECLARATION($jm_func, $1,
33 [
34 jm_tr_func=HAVE_DECL_`echo $jm_func | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ`
35 AC_DEFINE_UNQUOTED($jm_tr_func) $3], $4)dnl
36 done
37 ])
This page took 0.038664 seconds and 4 git commands to generate.