GitLab maintenance scheduled for Tomorrow, 2019-09-24, from 12:00 to 13:00 CT - Services will be unavailable during this time.

Commit 1e88120e authored by Shane Snyder's avatar Shane Snyder

autotool stuff for building tests against librados

parent 011be021
......@@ -38,11 +38,23 @@ LIBS="$ARGOBOTS_LIBS $LIBS"
CPPFLAGS="$ARGOBOTS_CFLAGS $CPPFLAGS"
CFLAGS="$ARGOBOTS_CFLAGS $CFLAGS"
# checks for typedefs, structures, and compiler characteristics.
# chekcs for library functions
# check for RADOS
AC_ARG_WITH([rados],
AS_HELP_STRING([--with_rados], [Additionally build tests against librados (default is no)]),
[], [])
if test x"$with_rados" == "xyes" ; then
# check for RADOS headers and libraries
AC_CHECK_HEADERS([librados.h rados_types.h],
[],
[AC_MSG_ERROR([RADOS support requested but could not find RADOS headers!])],
[])
AC_CHECK_LIB([rados], [rados_create],
[],
[AC_MSG_ERROR([RADOS support requested but could not link against librados!])])
# both found, set output to additionally build tests against RADOS
AM_CONDITIONAL(HAVE_RADOS, test x"$with_rados" == "xyes")
fi
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
/* src/mobject-store-config.h.in. Generated from configure.ac by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the `rados' library (-lrados). */
#undef HAVE_LIBRADOS
/* Define to 1 if you have the <librados.h> header file. */
#undef HAVE_LIBRADOS_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <rados_types.h> header file. */
#undef HAVE_RADOS_TYPES_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to the sub-directory where libtool stores uninstalled libraries. */
#undef LT_OBJDIR
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
check_PROGRAMS += \
tests/mobject-connect-test
if HAVE_RADOS
check_PROGRAMS += \
tests/rados-mobject-connect-test
endif
#TESTS += \
# tests/connect-test.sh
tests_mobject_connect_test_SOURCES = \
tests/mobject-connect-test.c
tests_mobject_connect_test_LDADD = \
src/libmobject-store.la
tests_mobject_connect_test_SOURCES = tests/mobject-connect-test.c
tests_mobject_connect_test_CPPFLAGS = -I${srcdir}/include
tests_mobject_connect_test_LDADD = src/libmobject-store.la
if HAVE_RADOS
tests_rados_mobject_connect_test_SOURCES = tests/mobject-connect-test.c
tests_rados_mobject_connect_test_CFLAGS = -DUSE_RADOS
tests_rados_mobject_connect_test_LDADD = -lrados
endif
......@@ -9,7 +9,7 @@
#include <stdio.h>
#include <assert.h>
#ifdef USE_LIBRADOS
#ifdef USE_RADOS
#include <librados.h>
#else
#include <librados-mobject-store.h>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment