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
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
28 dnl Check if library contains authgss_free_private_data
29 AC_CHECK_LIB([tirpc], [authgss_free_private_data], [have_free_private_data=yes],
30 [have_free_private_data=no])
33 if test "$enable_tirpc" != "no"; then
34 dnl also must have the headers installed where we expect
35 dnl look for headers; add -I compiler option if found
36 AC_CHECK_HEADERS([${tirpc_header_dir}/netconfig.h],
37 AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]),
38 [if test "$enable_tirpc" = "yes"; then
39 AC_MSG_ERROR([libtirpc headers not found.])
41 AC_MSG_WARN([libtirpc headers not found. TIRPC disabled!])
47 dnl now set $LIBTIRPC accordingly
48 if test "$enable_tirpc" != "no"; then
49 AC_DEFINE([HAVE_LIBTIRPC], 1,
50 [Define to 1 if you have and wish to use libtirpc.])
52 if test "$have_free_private_data" = "yes"; then
53 AC_DEFINE([HAVE_AUTHGSS_FREE_PRIVATE_DATA], 1,
54 [Define to 1 if your rpcsec library provides authgss_free_private_data,])