X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=aclocal%2Flibtirpc.m4;h=af4c7d3c10d109535f91282db8420b81f76dc99b;hp=b1f366989315bfc8e55e320e780ef0d7e41e186a;hb=336f8bca825416082d62ef38314f3e0b7e8f5cc2;hpb=d271666403a87e60bbdee85372b6dcf35c2975ed diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4 index b1f3669..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,8 +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.])]) + AC_SUBST([AM_CPPFLAGS], ["-I${tirpc_header_dir}"]) fi