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" != "no"; then
16 dnl look for the library; add to LIBS if found
17 AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
18 [if test "$enable_tirpc" = "yes"; then
19 AC_MSG_ERROR([libtirpc not found.])
21 AC_MSG_WARN([libtirpc not found. TIRPC disabled!])
26 if test "$enable_tirpc" != "no"; then
27 dnl also must have the headers installed where we expect
28 dnl look for headers; add -I compiler option if found
29 AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
30 AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
31 [if test "$enable_tirpc" = "yes"; then
32 AC_MSG_ERROR([libtirpc headers not found.])
34 AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])