X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=aclocal%2Flibtirpc.m4;h=b8233640837676d5b09db16d9910e54e4e1ab6ee;hp=9f0fde0a6cb93fad7a6c31824b293717223e52a9;hb=b5a5286f295bfc2147c33f9b79202d9e74befc55;hpb=10cfddc260b77025807906f72c8d98d9fe84a6c5 diff --git a/aclocal/libtirpc.m4 b/aclocal/libtirpc.m4 index 9f0fde0..b823364 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 @@ -23,6 +23,13 @@ AC_DEFUN([AC_LIBTIRPC], [ fi]) fi + if test "$enable_tirpc" != "no"; then + + dnl Check if library contains authgss_free_private_data + AC_CHECK_LIB([tirpc], [authgss_free_private_data], [have_free_private_data=yes], + [have_free_private_data=no]) + fi + if test "$enable_tirpc" != "no"; then dnl also must have the headers installed where we expect dnl look for headers; add -I compiler option if found @@ -37,4 +44,19 @@ 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" + if test "$have_free_private_data" = "yes"; then + AC_DEFINE([HAVE_AUTHGSS_FREE_PRIVATE_DATA], 1, + [Define to 1 if your rpcsec library provides authgss_free_private_data,]) + fi + else + LIBTIRPC="" + fi + + AC_SUBST(LIBTIRPC) + ])dnl