X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=aclocal%2Flibtirpc.m4;h=19b8361794854d0b616db61891e68aa1074cc7d3;hp=9f0fde0a6cb93fad7a6c31824b293717223e52a9;hb=a9b897fe1aaf4927478350d4e927cf69b45b8aab;hpb=2e1ea708610b4831518873cebde1c96368426471 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