1 # psi_add_str_const(name, value)
2 # Add a pre-defined string constant to $PSI_CONSTS_H
4 PSI_CONSTS="$PSI_CONSTS
5 {PSI_T_STRING, \"string\", \"psi\\\\$1\", $2, PSI_T_QUOTED_STRING},"
8 # psi_add_int_const(name, value)
9 # Add a pre-defined int constant to $PSI_CONSTS_H
11 PSI_CONSTS="$PSI_CONSTS
12 {PSI_T_INT, \"int\", \"psi\\\\$1\", \"$2\", PSI_T_NUMBER},"
15 dnl PSI_CONST(const name, type)
16 dnl Check the value of a str/int constant and add it to the list of pre-defined
19 AC_CACHE_CHECK(value of $1, psi_cv_const_$1, [
23 if test "$cross_compiling" = "yes"
25 AC_TRY_CPP(PSI_INCLUDES $1, psi_const_val=`eval "$ac_try|tail -n1"`, psi_const_val=)
27 PSI_COMPUTE_STR(psi_const_val, $1, PSI_INCLUDES)
31 AC_COMPUTE_INT(psi_const_val, $1, PSI_INCLUDES)
34 psi_cv_const_$1=$psi_const_val
36 if test "$psi_cv_const_$1"
40 psi_add_str_const "$1" "$psi_cv_const_$1"
43 psi_add_int_const "$1" "$psi_cv_const_$1"