X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=aclocal%2Flibtirpc.m4;h=af4c7d3c10d109535f91282db8420b81f76dc99b;hp=67c40120cf35df1f46601b00d2e44c85b8837078;hb=336f8bca825416082d62ef38314f3e0b7e8f5cc2;hpb=31c4305a67ca434ea5614f5bdb083fbe9acc2f7e diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4 index 67c4012..af4c7d3 100644 --- a/aclocal/libtirpc.m4 +++ b/aclocal/libtirpc.m4 @@ -2,6 +2,12 @@ dnl Checks for TI-RPC library and headers dnl AC_DEFUN([AC_LIBTIRPC], [ + AC_ARG_WITH([tirpcinclude], + [AC_HELP_STRING([--with-tirpcinclude=DIR], + [use TI-RPC headers in DIR])], + [tirpc_header_dir=$withval], + [tirpc_header_dir=/usr/include/tirpc]) + dnl if --enable-tirpc was specifed, the following components dnl must be present, and we set up HAVE_ macros for them. @@ -12,13 +18,10 @@ AC_DEFUN([AC_LIBTIRPC], [ [AC_MSG_ERROR([libtirpc not found.])]) dnl also must have the headers installed where we expect - AC_CHECK_HEADERS([tirpc/netconfig.h], , + dnl look for headers; add -I compiler option if found + AC_CHECK_HEADERS([${tirpc_header_dir}/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]) + AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]) fi