1 # psi_add_str_const(name, value)
2 # Add a pre-defined string constant to $PSI_CONSTS
4 grep -q "\"psi\\\\\\\\$1\"" $PSI_CONSTS || cat >>$PSI_CONSTS <<<" {PSI_T_STRING, \"string\", \"psi\\\\$1\", $2, PSI_T_QUOTED_STRING}, "
7 # psi_add_int_const(name, value)
8 # Add a pre-defined int constant to $PSI_CONSTS
10 grep -q "\"psi\\\\\\\\$1\"" $PSI_CONSTS || cat >>$PSI_CONSTS <<<" {PSI_T_INT, \"int\", \"psi\\\\$1\", \"$2\", PSI_T_NUMBER}, "
13 dnl PSI_CONST(const name, type)
14 dnl Check the value of a str/int constant and add it to the list of pre-defined
17 AC_CACHE_CHECK(value of $1, psi_cv_const_$1, [
21 if test "$cross_compiling" = "yes"
23 AC_TRY_CPP(PSI_INCLUDES $1, psi_const_val=`eval "$ac_try|tail -n1"`, psi_const_val=)
25 PSI_COMPUTE_STR(psi_const_val, $1, PSI_INCLUDES)
29 AC_COMPUTE_INT(psi_const_val, $1, PSI_INCLUDES)
32 psi_cv_const_$1=$psi_const_val
34 if test "$psi_cv_const_$1"
38 psi_add_str_const "$1" "$psi_cv_const_$1"
41 psi_add_int_const "$1" "$psi_cv_const_$1"