fi
dnl IPv6-enabled networking functions required for IPv6
- AC_CHECK_FUNCS([getifaddrs getnameinfo bindresvport_sa], ,
+ AC_CHECK_FUNCS([getifaddrs getnameinfo], ,
[AC_MSG_ERROR([Missing library functions needed for IPv6.])])
+ AC_CHECK_LIB([tirpc], [bindresvport_sa], [:],
+ [AC_MSG_ERROR([Missing library functions needed for IPv6.])])
fi
])dnl
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
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
rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+rpcgen_LDADD=$(LIBTIRPC)
MAINTAINERCLEANFILES = Makefile.in
gssd_LDADD = ../../support/nfs/libnfs.a \
$(RPCSECGSS_LIBS) $(GSSGLUE_LIBS) $(KRBLIBS)
-gssd_LDFLAGS = $(KRBLDFLAGS)
+gssd_LDFLAGS = $(KRBLDFLAGS) $(LIBTIRPC)
gssd_CFLAGS = $(AM_CFLAGS) $(CFLAGS) \
$(RPCSECGSS_CFLAGS) $(GSSGLUE_CFLAGS) $(KRBCFLAGS)
svcgssd_LDADD = \
../../support/nfs/libnfs.a \
$(RPCSECGSS_LIBS) $(GSSGLUE_LIBS) $(LIBNFSIDMAP) \
- $(KRBLIBS)
+ $(KRBLIBS) $(LIBTIRPC)
svcgssd_LDFLAGS = $(KRBLDFLAGS)
endif
mount_nfs_LDADD = ../../support/nfs/libnfs.a \
- ../../support/export/libexport.a
+ ../../support/export/libexport.a \
+ $(LIBTIRPC)
mount_nfs_SOURCES = $(mount_common)
mountd_LDADD = ../../support/export/libexport.a \
../../support/nfs/libnfs.a \
../../support/misc/libmisc.a \
- $(LIBBSD) $(LIBWRAP) $(LIBNSL) $(LIBBLKID) $(LIBDL)
+ $(LIBBSD) $(LIBWRAP) $(LIBNSL) $(LIBBLKID) $(LIBDL) $(LIBTIRPC)
mountd_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \
-I$(top_builddir)/support/include \
-I$(top_srcdir)/support/export
sbin_PROGRAMS = nfsd
nfsd_SOURCES = nfsd.c nfssvc.c
-nfsd_LDADD = ../../support/nfs/libnfs.a
+nfsd_LDADD = ../../support/nfs/libnfs.a $(LIBTIRPC)
MAINTAINERCLEANFILES = Makefile.in
showmount_SOURCES = showmount.c
showmount_LDADD = ../../support/export/libexport.a \
../../support/nfs/libnfs.a \
- ../../support/misc/libmisc.a
+ ../../support/misc/libmisc.a \
+ $(LIBTIRPC)
showmount_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \
-I$(top_builddir)/support/export
statd_LDADD = ../../support/nsm/libnsm.a \
../../support/nfs/libnfs.a \
../../support/misc/libmisc.a \
- $(LIBWRAP) $(LIBNSL) $(LIBCAP)
+ $(LIBWRAP) $(LIBNSL) $(LIBCAP) $(LIBTIRPC)
sm_notify_LDADD = ../../support/nsm/libnsm.a \
../../support/nfs/libnfs.a \
- $(LIBNSL) $(LIBCAP)
+ $(LIBNSL) $(LIBCAP) $(LIBTIRPC)
EXTRA_DIST = sim_sm_inter.x $(man8_MANS) COPYRIGHT simulate.c