AC_PROG_LIBTOOL
AM_PROG_CC_C_O
+PKG_PROG_PKG_CONFIG
# Work around stupid autoconf default cflags. pt 2
if test "$SAVE_CFLAGS" = "x"; then
#include <sys/socket.h>
])
-echo "Use TI-RPC: $enable_tirpc"
+LIBNFS_PC_REQ_PRIVATE=
+
if test "$enable_tirpc" = "yes"; then
- CFLAGS="${CFLAGS} -I /usr/include/tirpc"
- LDFLAGS="${LDFLAGS} -ltirpc"
+ PKG_CHECK_MODULES(TIRPC, libtirpc, [],
+ AC_MSG_ERROR([unable to locate libtirpc files]))
+ CFLAGS="${CFLAGS} ${TIRPC_CFLAGS}"
+ LIBS="${LIBS} ${TIRPC_LIBS}"
+ LIBNFS_PC_REQ_PRIVATE="${LIBNFS_PC_REQ_PRIVATE} libtirpc"
fi
+AC_SUBST(LIBNFS_PC_REQ_PRIVATE)
+
#output
AC_CONFIG_FILES([Makefile]
[include/Makefile]