]> git.decadent.org.uk Git - nfs-utils.git/blobdiff - aclocal/libtirpc.m4
Imported upstream 1.2.6
[nfs-utils.git] / aclocal / libtirpc.m4
index 9f0fde0a6cb93fad7a6c31824b293717223e52a9..19b8361794854d0b616db61891e68aa1074cc7d3 100644 (file)
@@ -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