Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
mobject-store
Commits
1e88120e
Commit
1e88120e
authored
Oct 17, 2017
by
Shane Snyder
Browse files
autotool stuff for building tests against librados
parent
011be021
Changes
4
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
1e88120e
...
...
@@ -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
0 → 100644
View file @
1e88120e
/* 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
tests/Makefile.subdir
View file @
1e88120e
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
tests/mobject-connect-test.c
View file @
1e88120e
...
...
@@ -9,7 +9,7 @@
#include
<stdio.h>
#include
<assert.h>
#ifdef USE_
LIB
RADOS
#ifdef USE_RADOS
#include
<librados.h>
#else
#include
<librados-mobject-store.h>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment