2 # add_str_const(name, value)
4 PSI_CONSTS="{PSI_T_STRING, \"string\", \"psi\\\\$1\", $2, PSI_T_QUOTED_STRING}, $PSI_CONSTS"
6 # add_int_const(name, value)
8 PSI_CONSTS="{PSI_T_INT, \"int\", \"psi\\\\$1\", \"$2\", PSI_T_NUMBER}, $PSI_CONSTS"
10 dnl PSI_CONST(const name, type)
12 AC_CACHE_CHECK(value of $1, psi_cv_const_$1, [
16 if test "$cross_compiling" = "yes"
18 AC_TRY_CPP(PSI_INCLUDES $1, psi_const_val=`eval "$ac_try|tail -n1"`, psi_const_val=)
20 PSI_COMPUTE_STR(psi_const_val, $1, PSI_INCLUDES)
24 AC_COMPUTE_INT(psi_const_val, $1, PSI_INCLUDES)
27 psi_cv_const_$1=$psi_const_val
29 if test "$psi_cv_const_$1"
33 add_str_const "$1" "$psi_cv_const_$1"
36 add_int_const "$1" "$psi_cv_const_$1"