summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.in4
-rw-r--r--src/Makefile.am13
2 files changed, 10 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index de1c730..7d43fd4 100644
--- a/configure.in
+++ b/configure.in
@@ -51,7 +51,9 @@ AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h \
unistd.h nss.h])
AC_CHECK_LIB([pthread], [pthread_create])
-AC_CHECK_LIB([tirpc], [clnt_create])
+
+PKG_CHECK_MODULES([TIRPC], [libtirpc])
+
AC_ARG_ENABLE(libwrap,[ --enable-libwrap Enables host name checking],
[case "${enableval}" in
yes) libwarp=true
diff --git a/src/Makefile.am b/src/Makefile.am
index cc0a85b..a2f3e34 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = -I$(srcdir)/tirpc -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
+INCLUDES = $(TIRPC_CFLAGS) -DPORTMAP -DINET6 -DVERSION="\"$(VERSION)\"" \
-D_GNU_SOURCE -Wall -pipe
if DEBUG
INCLUDES += -DRPCBIND_DEBUG -DSVC_RUN_DEBUG -DDEBUG_RMTCALL
@@ -23,12 +23,13 @@ rpcbind_SOURCES = check_bound.c rpcbind.c \
rpcbind.h
rpcinfo_SOURCES = rpcinfo.c
-rpcinfo_LDFLAGS = -lpthread -ltirpc
-rpcinfo_LDADD = $(LIB_TIRPC)
+rpcinfo_LDFLAGS = -lpthread
+rpcinfo_LDADD = $(TIRPC_LIBS)
-rpcbind_LDFLAGS = -lpthread -ltirpc
-rpcbind_LDADD = $(LIB_TIRPC)
-AM_CPPFLAGS = -I/usr/include/tirpc -DCHECK_LOCAL -DPORTMAP \
+rpcbind_LDFLAGS = -lpthread
+rpcbind_CFLAGS = $(TIRPC_CFLAGS)
+rpcbind_LDADD = $(TIRPC_LIBS)
+AM_CPPFLAGS = -DCHECK_LOCAL -DPORTMAP \
-DFACILITY=LOG_MAIL -DSEVERITY=LOG_INFO