+
+ AC_PROG_NM
+ AC_PROG_AWK
+ PSI_FUNCS=
+ dnl PSI_FUNC(fn, decl)
+ AC_DEFUN(PSI_FUNC, [
+ AC_CHECK_FUNC($1, [
+ AC_MSG_CHECKING(for redirection of function $1)
+ psi_symbol=$1
+ psi_symbol_redirect=
+ AC_TRY_LINK_FUNC($1, [
+ psi_symbol_redirect=`$NM -g conftest$ac_exeext | $AWK -F" *|@" '/_main/ {next} / U / {print$[]3}'`
+ ])
+ AC_MSG_RESULT($psi_symbol_redirect)
+ if test "$psi_symbol_redirect" && test "$psi_symbol_redirect" != "$psi_symbol"
+ then
+ PSI_FUNCS="{\"$psi_symbol\", (void *) $psi_symbol}, $PSI_FUNCS"
+ fi
+ ])
+ ])