Browse Source

Merge branch 'master' into passthrough

master
Con Kolivas 10 years ago
parent
commit
de28f9daa4
  1. 17
      configure.ac
  2. 5
      src/Makefile.am

17
configure.ac

@ -42,7 +42,6 @@ AC_CHECK_HEADERS(libpq-fe.h postgresql/libpq-fe.h grp.h)
PTHREAD_LIBS="-lpthread" PTHREAD_LIBS="-lpthread"
MATH_LIBS="-lm" MATH_LIBS="-lm"
RT_LIBS="-lrt" RT_LIBS="-lrt"
PQ_LIBS="-lpq"
AC_CONFIG_SUBDIRS([src/jansson-2.6]) AC_CONFIG_SUBDIRS([src/jansson-2.6])
JANSSON_LIBS="jansson-2.6/src/.libs/libjansson.a" JANSSON_LIBS="jansson-2.6/src/.libs/libjansson.a"
@ -50,9 +49,23 @@ JANSSON_LIBS="jansson-2.6/src/.libs/libjansson.a"
AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_LIBS)
AC_SUBST(MATH_LIBS) AC_SUBST(MATH_LIBS)
AC_SUBST(RT_LIBS) AC_SUBST(RT_LIBS)
AC_SUBST(PQ_LIBS)
AC_SUBST(JANSSON_LIBS) AC_SUBST(JANSSON_LIBS)
AC_ARG_WITH([ckdb],
[AC_HELP_STRING([--without-ckdb],[Compile ckpool without postgresql database support (default enabled)])],
[ckdb=$withval]
)
if test "x$ckdb" != "xno"; then
AC_CHECK_LIB([pq], [main],[PQ=-lpq],echo "Error: Required library libpq-dev
not found. Install it or disable postgresql support with --without-ckdb" && exit 1)
PQ_LIBS="-lpq"
else
PQ_LIBS=""
fi
AM_CONDITIONAL([WANT_CKDB], [test "x$ckdb" != "xno"])
AC_SUBST(PQ_LIBS)
AC_OUTPUT([Makefile] [src/Makefile]) AC_OUTPUT([Makefile] [src/Makefile])
echo echo

5
src/Makefile.am

@ -7,7 +7,7 @@ lib_LTLIBRARIES = libckpool.la
libckpool_la_SOURCES = libckpool.c libckpool.h sha2.c sha2.h libckpool_la_SOURCES = libckpool.c libckpool.h sha2.c sha2.h
libckpool_la_LIBADD = @PTHREAD_LIBS@ @MATH_LIBS@ @RT_LIBS@ libckpool_la_LIBADD = @PTHREAD_LIBS@ @MATH_LIBS@ @RT_LIBS@
bin_PROGRAMS = ckpool ckpmsg ckdb bin_PROGRAMS = ckpool ckpmsg
ckpool_SOURCES = ckpool.c ckpool.h generator.c generator.h bitcoin.c bitcoin.h \ ckpool_SOURCES = ckpool.c ckpool.h generator.c generator.h bitcoin.c bitcoin.h \
stratifier.c stratifier.h connector.c connector.h uthash.h \ stratifier.c stratifier.h connector.c connector.h uthash.h \
utlist.h utlist.h
@ -16,5 +16,8 @@ ckpool_LDADD = libckpool.la @JANSSON_LIBS@
ckpmsg_SOURCES = ckpmsg.c ckpmsg_SOURCES = ckpmsg.c
ckpmsg_LDADD = libckpool.la @JANSSON_LIBS@ ckpmsg_LDADD = libckpool.la @JANSSON_LIBS@
if WANT_CKDB
bin_PROGRAMS += ckdb
ckdb_SOURCES = ckdb.c klist.c ktree.c klist.h ktree.h ckdb_SOURCES = ckdb.c klist.c ktree.c klist.h ktree.h
ckdb_LDADD = libckpool.la @JANSSON_LIBS@ @PQ_LIBS@ ckdb_LDADD = libckpool.la @JANSSON_LIBS@ @PQ_LIBS@
endif

Loading…
Cancel
Save