Skip to content

Commit

Permalink
configure: check for tirpc library
Browse files Browse the repository at this point in the history
In Fedora 28, the rpc library is now an library on it own.
  • Loading branch information
pstorz committed May 21, 2018
1 parent 76c240a commit d66659a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 7 deletions.
12 changes: 9 additions & 3 deletions autoconf/configure.in
Expand Up @@ -847,9 +847,6 @@ if test x$generate_debian_control = xyes; then
fi
AC_SUBST(DEBIAN_CONTROL)




dnl -----------------------------------------------------------------------

dnl Minimal stuff for readline Makefile configuration
Expand All @@ -866,7 +863,16 @@ AC_CHECK_FUNCS(lstat lchown lchmod utimes lutimes futimes futimens fchmod fchown
AC_CHECK_FUNCS(mmap nanosleep nl_langinfo)
AC_CHECK_HEADERS(varargs.h)


dnl -----------------------------------------------------------------------
AC_CHECK_HEADER(cephfs/ceph_statx.h, [AC_DEFINE(HAVE_CEPHFS_CEPH_STATX_H, 1, [Define to 1 if you have the <cephfs/ceph_statx.h> header file.])] , )
AC_CHECK_LIB(tirpc, callrpc, [LIBS="$LIBS -ltirpc"
CFLAGS="${CFLAGS} -I/usr/include/tirpc"
CXXFLAGS="${CXXFLAGS} -I/usr/include/tirpc"
CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc"
])




dnl ---------------------------------------------------------------------------
Expand Down
50 changes: 47 additions & 3 deletions configure
Expand Up @@ -23315,9 +23315,6 @@ fi






MAKE_SHELL=/bin/sh

{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
Expand Down Expand Up @@ -23601,6 +23598,7 @@ fi
done



ac_fn_c_check_header_mongrel "$LINENO" "cephfs/ceph_statx.h" "ac_cv_header_cephfs_ceph_statx_h" "$ac_includes_default"
if test "x$ac_cv_header_cephfs_ceph_statx_h" = xyes; then :

Expand All @@ -23609,6 +23607,52 @@ $as_echo "#define HAVE_CEPHFS_CEPH_STATX_H 1" >>confdefs.h
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for callrpc in -ltirpc" >&5
$as_echo_n "checking for callrpc in -ltirpc... " >&6; }
if ${ac_cv_lib_tirpc_callrpc+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ltirpc $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */

/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
builtin and then its argument prototype would still apply. */
#ifdef __cplusplus
extern "C"
#endif
char callrpc ();
int
main ()
{
return callrpc ();
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
ac_cv_lib_tirpc_callrpc=yes
else
ac_cv_lib_tirpc_callrpc=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tirpc_callrpc" >&5
$as_echo "$ac_cv_lib_tirpc_callrpc" >&6; }
if test "x$ac_cv_lib_tirpc_callrpc" = xyes; then :
LIBS="$LIBS -ltirpc"
CFLAGS="${CFLAGS} -I/usr/include/tirpc"
CXXFLAGS="${CXXFLAGS} -I/usr/include/tirpc"
CPPFLAGS="${CPPFLAGS} -I/usr/include/tirpc"

fi





{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for cmocka support" >&5
Expand Down
2 changes: 1 addition & 1 deletion src/ndmp/Makefile.in
Expand Up @@ -79,7 +79,7 @@ NDMJOB_OBJS = $(NDMJOB_SRCS:.c=.lo)
WRAP_TAR_OBJS = $(WRAP_TAR_SRCS:.c=.lo)
WRAP_TEST_OBJS = $(WRAP_TEST_SRCS:.c=.lo)

INCLUDES += -I. -I$(srcdir) -I$(basedir) -I$(basedir)/include
INCLUDES += -I. -I$(srcdir) -I$(basedir) -I$(basedir)/include -I$(includedir)/tirpc
CFLAGS += -DNDMOS_OPTION_PRETTYPRINT_HUMAN_READABLE_IP
# CFLAGS += -DNDMOS_OPTION_NO_TEST_AGENTS

Expand Down

0 comments on commit d66659a

Please sign in to comment.