Modularized the build; made berkeleydb and confuse optional. No longer build as many things by default.
This commit is contained in:
parent
499fdc9dfa
commit
b8d0ccce79
11 changed files with 93 additions and 17 deletions
|
@ -1,6 +1,7 @@
|
|||
LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \
|
||||
$(top_builddir)/src/lladd/liblladd.a \
|
||||
LDADD=$(top_builddir)/src/lladd/liblladd.a \
|
||||
$(top_builddir)/src/libdfa/librw.a
|
||||
#$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a
|
||||
|
||||
bin_PROGRAMS=lhtableThreaded naiveHash logicalHash readLogicalHash naiveMultiThreaded logicalMultThreaded rawSet \
|
||||
arrayListSet logicalMultiReaders linearHashNTA linkedListNTA pageOrientedListNTA \
|
||||
linearHashNTAThreaded linearHashNTAMultiReader linearHashNTAWriteRequests transitiveClosure zeroCopy
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
LDADD=-lpthread
|
||||
if BUILD_BENCHMARKS
|
||||
if DB_ENABLED
|
||||
LDADD=@DB_LIBS@
|
||||
bin_PROGRAMS=transapp bdbRaw bdbHash bdbHashThreaded bdbHashWriteRequests
|
||||
AM_CFLAGS=-g
|
||||
endif
|
||||
endif
|
51
configure.in
51
configure.in
|
@ -67,15 +67,13 @@ if test "$db_cv_open_o_direct" = "yes"; then
|
|||
AH_TEMPLATE(HAVE_O_DIRECT, [Define to 1 if you have the O_DIRECT flag.])
|
||||
fi
|
||||
|
||||
AC_CONFIG_DB
|
||||
|
||||
AC_CHECK_LIB([check], [suite_create], , AC_MSG_WARN([Check not found; cannot run unit tests!]))
|
||||
|
||||
## This perl script thing is a total hack, but we need to define HAVE_LIBCHECK
|
||||
## inside of an AM_CONDITIONAL to get conditional compilation to work.
|
||||
AM_CONDITIONAL(HAVE_LIBCHECK, echo $LIBS | [
|
||||
perl -ne 'if($_=~/-lcheck/)
|
||||
{ print qq(Check found, make check will run full test suite.
|
||||
{ print qq(Check found, make check will run test suites. --enable-confuse will enable extra tests of old code.
|
||||
); exit 0; } else { print qq(
|
||||
--------------------------------
|
||||
|
||||
|
@ -86,6 +84,8 @@ Check not found! Most tests will be skipped by make check!
|
|||
--------------------------------
|
||||
); exit 1; }'])
|
||||
|
||||
|
||||
|
||||
#have_libcheck", "xyes")
|
||||
#AC_CHECK_LIB([check],
|
||||
# [suite_create], AC_MSG_WARN([Check not found; cannot run unit tests!]
|
||||
|
@ -96,7 +96,47 @@ Check not found! Most tests will be skipped by make check!
|
|||
#AM_CONDITIONAL(HAVE_CHECK, test xyes, xyes)
|
||||
AC_CHECK_LIB([m], [sqrt])
|
||||
AC_CHECK_LIB([pthread], [pthread_create])
|
||||
AC_CHECK_LIB([confuse], [cfg_set_validate_func])
|
||||
#AC_CHECK_LIB([confuse], [cfg_set_validate_func])
|
||||
## Repeat hack for LIBCONFUSE
|
||||
|
||||
AC_ARG_ENABLE([deprecated-networking],
|
||||
AC_HELP_STRING([--enable-network],
|
||||
[Enables old networking code. Requires libconfuse]),
|
||||
if test x$enableval = xno ; then
|
||||
echo "Networking disabled; not checking for confuse"
|
||||
else
|
||||
AC_CHECK_LIB([confuse], [cfg_set_validate_func])
|
||||
fi,
|
||||
echo "Networking disabled; not checking for confuse"
|
||||
)
|
||||
|
||||
# Repeat hack for LIBCONFUSE
|
||||
AM_CONDITIONAL(HAVE_LIBCONFUSE, echo $LIBS | [
|
||||
perl -ne 'if($_=~/-lconfuse/)
|
||||
{ print qq(Confuse found, make check will run full test suite.
|
||||
); exit 0; } else { print qq(Confuse not found; will skip networked stuff.
|
||||
); exit 1; }'])
|
||||
|
||||
|
||||
AC_ARG_ENABLE([pobj],
|
||||
AC_HELP_STRING([--enable-pobj], [Build pobj]),
|
||||
AM_CONDITIONAL(BUILD_POBJ, test x$enableval = xyes),
|
||||
AM_CONDITIONAL(BUILD_POBJ, false)
|
||||
)
|
||||
|
||||
AC_ARG_ENABLE([benchmarks],
|
||||
AC_HELP_STRING([--enable-benchmarks],
|
||||
[Build benchmarks. Requires Berkeley DB >= 4.2]),
|
||||
AM_CONDITIONAL(BUILD_BENCHMARKS, test x$enableval = xyes),
|
||||
# AC_CONFIG_DB,
|
||||
AM_CONDITIONAL(BUILD_BENCHMARKS, false)
|
||||
)
|
||||
|
||||
AC_CONFIG_DB
|
||||
|
||||
AC_CHECK_LIB([intl], [bindtextdomain])
|
||||
AC_CHECK_LIB([c], [bindtextdomain])
|
||||
|
||||
# Checks for header files.
|
||||
AC_HEADER_DIRENT
|
||||
AC_HEADER_STDC
|
||||
|
@ -110,6 +150,9 @@ AC_TYPE_SIZE_T
|
|||
AC_HEADER_TIME
|
||||
AC_STRUCT_TM
|
||||
|
||||
#enable largefile support.
|
||||
AC_SYS_LARGEFILE
|
||||
|
||||
# Checks for library functions.
|
||||
AC_FUNC_ERROR_AT_LINE
|
||||
AC_FUNC_MALLOC
|
||||
|
|
6
m4/db.m4
6
m4/db.m4
|
@ -69,11 +69,15 @@ AC_DEFUN([AC_CONFIG_DB], [
|
|||
LDFLAGS="$LDFLAGS -L$dtn_cv_path_db_lib"
|
||||
fi
|
||||
|
||||
LIBS="$LIBS -l$dtn_cv_lib_db"
|
||||
#LIBS="$LIBS -l$dtn_cv_lib_db"
|
||||
DB_LIBS="-l$dtn_cv_lib_db"
|
||||
|
||||
fi # DB_ENABLED
|
||||
|
||||
AC_SUBST(DB_ENABLED)
|
||||
AC_SUBST(DB_LIBS)
|
||||
AM_CONDITIONAL(DB_ENABLED, test x$ac_dbdir != xno)
|
||||
#AM_CONDITIONAL(DB_ENABLED, $DB_ENABLED)
|
||||
])
|
||||
|
||||
dnl
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#LDADD=$(top_builddir)/build/libdfa.a
|
||||
if HAVE_LIBCONFUSE
|
||||
lib_LIBRARIES=lib2pc.a
|
||||
lib2pc_a_SOURCES=2pc.c
|
||||
AM_CFLAGS=${GLOBAL_CFLAGS}
|
||||
endif
|
|
@ -1 +1,8 @@
|
|||
SUBDIRS = lladd libdfa 2pc timing pobj apps
|
||||
SUBDIRS = lladd libdfa 2pc timing
|
||||
|
||||
if BUILD_POBJ
|
||||
SUBDIRS += pobj
|
||||
endif
|
||||
|
||||
SUBDIRS += apps
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
if HAVE_LIBCONFUSE
|
||||
LDADD=$(top_builddir)/src/libdfa/libdfa.a $(top_builddir)/src/2pc/lib2pc.a
|
||||
SOURCES=cht.c
|
||||
#SOURCES=cht.c
|
||||
lib_LIBRARIES=libcht.a
|
||||
libcht_a_SOURCES=cht.c cht_client.c cht_server.c cht_message.c
|
||||
AM_CFLAGS=${GLOBAL_CFLAGS}
|
||||
endif
|
|
@ -231,7 +231,7 @@ state_name veto_or_prepare_cht(void * dfaSet, StateMachine * stateMachine, Messa
|
|||
return ret;
|
||||
}
|
||||
state_name eval_action_cht(void * dfaSet, StateMachine * stateMachine, Message * m, char * from) {
|
||||
state_name ret;
|
||||
state_name ret = -1;
|
||||
setup_vars;
|
||||
|
||||
int xid = getXid(ht_xid, app_state_cht->xid_ht, stateMachine->machine_id);
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
#LDADD=$(top_builddir)/build/transactional.a $(top_builddir)/build/libpbl.a
|
||||
if HAVE_LIBCONFUSE
|
||||
lib_LIBRARIES=libdfa.a librw.a
|
||||
else
|
||||
lib_LIBRARIES=librw.a
|
||||
endif
|
||||
|
||||
libdfa_a_SOURCES=libdfa.c monotree.c smash.c callbacks.c messages.c networksetup.c
|
||||
librw_a_SOURCES=rw.c
|
||||
AM_CFLAGS=${GLOBAL_CFLAGS}
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
SUBDIRS = lladd monotree messages dfa 2pc cht pobj
|
||||
#INCLUDES = @CHECK_CFLAGS@
|
||||
if HAVE_LIBCHECK
|
||||
|
||||
SUBDIRS = lladd
|
||||
|
||||
if HAVE_LIBCONFUSE
|
||||
SUBDIRS += monotree messages dfa 2pc cht
|
||||
endif
|
||||
|
||||
if BUILD_POBJ
|
||||
SUBDIRS += pobj
|
||||
endif
|
||||
|
||||
TESTS = check_check
|
||||
else
|
||||
TESTS =
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a \
|
||||
$(top_builddir)/src/lladd/liblladd.a \
|
||||
#LDADD=$(top_builddir)/src/2pc/lib2pc.a $(top_builddir)/src/libdfa/libdfa.a
|
||||
|
||||
LDADD=$(top_builddir)/src/lladd/liblladd.a \
|
||||
$(top_builddir)/src/libdfa/librw.a
|
||||
bin_PROGRAMS=logfile_dump run_recovery truncate_log
|
||||
AM_CFLAGS=${GLOBAL_CFLAGS}
|
||||
|
|
Loading…
Reference in a new issue