- AC_CHECK_HEADERS([tirpc/netconfig.h], ,
- [AC_MSG_ERROR([libtirpc headers not found.])])
-
- dnl set up HAVE_FOO for various functions
- AC_CHECK_FUNCS([getnetconfig \
- clnt_create clnt_create_timed \
- clnt_vc_create clnt_dg_create xdr_rpcb])
+ dnl look for headers; add -I compiler option if found
+ AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
+ AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
+ [if test "$enable_tirpc" = "yes"; then
+ AC_MSG_ERROR([libtirpc headers not found.])
+ else
+ AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])
+ enable_tirpc="no"
+ fi])