]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
Detect presence of nfs4_set_debug() in libnfsidmap and
authorGreg Banks <gnb@melbourne.sgi.com>
Thu, 22 Jun 2006 07:31:24 +0000 (17:31 +1000)
committerGreg Banks <gnb@melbourne.sgi.com>
Thu, 22 Jun 2006 07:31:24 +0000 (17:31 +1000)
don't bother calling it if it's missing.

configure.in
utils/idmapd/idmapd.c

index 9a392e8f1d99bba18952011428f0b64d7595a5f9..1a1a25d384d39681b7947b315fbee7da34052630 100644 (file)
@@ -180,6 +180,10 @@ if test "$enable_gss" = yes; then
   dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
   AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support]))
   AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support]))
+  dnl the nfs4_set_debug function doesn't appear in all version of the library
+  AC_CHECK_LIB(nfsidmap, nfs4_set_debug,
+              AC_DEFINE(HAVE_NFS4_SET_DEBUG,1,
+                        [Whether nfs4_set_debug() is present in libnfsidmap]),)
 
   dnl Check for Kerberos V5
   AC_KERBEROS_V5
index 158feaf66c11627beb931ab253d7c56cb9722c6b..c8ce6b2db54e305d6cf57aeb8541584490b44e7f 100644 (file)
@@ -345,7 +345,9 @@ main(int argc, char **argv)
                errx(1, "Could not find group \"%s\"", nobodygroup);
        nobodygid = gr->gr_gid;
 
+#ifdef HAVE_NFS4_SET_DEBUG
        nfs4_set_debug(verbose, idmapd_warnx);
+#endif
        if (conf_path == NULL)
                conf_path = _PATH_IDMAPDCONF;
        if (nfs4_init_name_mapping(conf_path))