1 dnl Checks for TI-RPC library and headers
3 AC_DEFUN([AC_LIBTIRPC], [
5 AC_ARG_WITH([tirpcinclude],
6 [AC_HELP_STRING([--with-tirpcinclude=DIR],
7 [use TI-RPC headers in DIR])],
8 [tirpc_header_dir=$withval],
9 [tirpc_header_dir=/usr/include/tirpc])
11 dnl if --enable-tirpc was specifed, the following components
12 dnl must be present, and we set up HAVE_ macros for them.
14 if test "$enable_tirpc" = yes; then
16 dnl look for the library; add to LIBS if found
17 AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
18 [AC_MSG_ERROR([libtirpc not found.])])
20 dnl also must have the headers installed where we expect
21 dnl look for headers; add -I compiler option if found
22 AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h], ,
23 [AC_MSG_ERROR([libtirpc headers not found.])])
24 AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"])