summaryrefslogtreecommitdiffstats
path: root/aclocal/libtirpc.m4
diff options
context:
space:
mode:
Diffstat (limited to 'aclocal/libtirpc.m4')
-rw-r--r--aclocal/libtirpc.m415
1 files changed, 13 insertions, 2 deletions
diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4
index 9f0fde0..19b8361 100644
--- a/aclocal/libtirpc.m4
+++ b/aclocal/libtirpc.m4
@@ -13,8 +13,8 @@ AC_DEFUN([AC_LIBTIRPC], [
if test "$enable_tirpc" != "no"; then
- dnl look for the library; add to LIBS if found
- AC_CHECK_LIB([tirpc], [clnt_tli_create], ,
+ dnl look for the library
+ AC_CHECK_LIB([tirpc], [clnt_tli_create], [:],
[if test "$enable_tirpc" = "yes"; then
AC_MSG_ERROR([libtirpc not found.])
else
@@ -37,4 +37,15 @@ AC_DEFUN([AC_LIBTIRPC], [
fi
+ dnl now set $LIBTIRPC accordingly
+ if test "$enable_tirpc" != "no"; then
+ AC_DEFINE([HAVE_LIBTIRPC], 1,
+ [Define to 1 if you have and wish to use libtirpc.])
+ LIBTIRPC="-ltirpc"
+ else
+ LIBTIRPC=""
+ fi
+
+ AC_SUBST(LIBTIRPC)
+
])dnl