1 dnl Some systems have different arguments to the tputs callback; it can
2 dnl be int (*)(int), or int (*)(char). Try to probe to see which one it
3 dnl actually is, so our callback can match the prototype.
5 dnl The first argument to tputs sometimes is char *, other times is
6 dnl const char *, so we have to include that in the test as well, but
7 dnl we don't provide any definitions for it (since it's not necessary)
10 AC_DEFUN([NMH_TPUTS_PUTC_ARG],
11 [AC_CACHE_CHECK([the argument of the tputs() callback],
12 [nmh_cv_tputs_putc_arg],
13 [for tputs_arg1 in 'const char *' 'char *'; do
14 for tputs_putc_arg in 'int' 'char'; do
21 [extern int tputs($tputs_arg1, int, int (*)($tputs_putc_arg));])],
22 [nmh_cv_tputs_putc_arg="$tputs_putc_arg"; break 2])
25 AS_IF([test "X$nmh_cv_tputs_putc_arg" = X],
26 [AC_MSG_FAILURE([cannot determine tputs callback argument])])])
27 AC_DEFINE_UNQUOTED([TPUTS_PUTC_ARG], [$nmh_cv_tputs_putc_arg],
28 [The type of the argument of the tputs() callback])