Browse Source

Simplify configure and makefile.

master
Con Kolivas 5 years ago
parent
commit
a3190dffb1
  1. 21
      configure.ac
  2. 7
      src/Makefile.am

21
configure.ac

@ -75,32 +75,11 @@ JANSSON_LIBS="jansson-2.10/src/.libs/libjansson.a"
AC_SUBST(JANSSON_LIBS) AC_SUBST(JANSSON_LIBS)
AC_ARG_WITH([ckdb],
[AC_HELP_STRING([--with-ckdb],[Compile ckpool with ckdb database support (default disabled)])],
[ckdb=$withval],[ckdb=no]
)
AC_SEARCH_LIBS(clock_nanosleep, rt, , "Error: Required library rt not found." && exit 1) AC_SEARCH_LIBS(clock_nanosleep, rt, , "Error: Required library rt not found." && exit 1)
AC_SEARCH_LIBS(exp, m, , echo "Error: Required library math not found." && exit 1) AC_SEARCH_LIBS(exp, m, , echo "Error: Required library math not found." && exit 1)
AC_SEARCH_LIBS(pthread_mutex_trylock, pthread, , "Error: Required library pthreads not found." && exit 1) AC_SEARCH_LIBS(pthread_mutex_trylock, pthread, , "Error: Required library pthreads not found." && exit 1)
AC_SEARCH_LIBS(zmq_socket, zmq, , "Error: Required library zmq not found." && exit 1) AC_SEARCH_LIBS(zmq_socket, zmq, , "Error: Required library zmq not found." && exit 1)
if test "x$ckdb" != "xno"; then
AC_SEARCH_LIBS(PQdb, pq, , echo "Error: Required library pq
not found. Install it or disable support by removing --with-ckdb" && exit 1)
AC_SEARCH_LIBS(BN_init, crypto, , echo "Error: Required library crypto
not found. Install them or disable support by removing --with-ckdb" && exit 1)
AC_SEARCH_LIBS(SSL_accept, ssl, , echo "Error: Required libraries ssl
not found. Install them or disable support by removing --with-ckdb" && exit 1)
AC_SEARCH_LIBS(cblas_dgemm, gslcblas, ,echo "Error: Required library gslcblas
not found. Install them or disable support by removing --with-ckdb" && exit 1)
AC_SEARCH_LIBS(gsl_blas_dgemm, gsl, , echo "Error: Required library gsl
not found. Install them or disable support by removing --with-ckdb" && exit 1)
AC_DEFINE([USE_CKDB], [1], [Defined to 1 if ckdb support required])
fi
AM_CONDITIONAL([WANT_CKDB], [test "x$ckdb" != "xno"])
AC_SUBST(DB_LIBS)
AC_OUTPUT([Makefile] [src/Makefile]) AC_OUTPUT([Makefile] [src/Makefile])
LDFLAGS="${LDFLAGS} -Wl,--as-needed" LDFLAGS="${LDFLAGS} -Wl,--as-needed"

7
src/Makefile.am

@ -34,13 +34,6 @@ ckpmsg_LDADD = libckpool.a @JANSSON_LIBS@
notifier_SOURCES = notifier.c notifier_SOURCES = notifier.c
notifier_LDADD = libckpool.a @JANSSON_LIBS@ notifier_LDADD = libckpool.a @JANSSON_LIBS@
if WANT_CKDB
bin_PROGRAMS += ckdb
ckdb_SOURCES = ckdb.c ckdb_cmd.c ckdb_data.c ckdb_dbio.c ckdb_btc.c \
ckdb_crypt.c ckdb.h klist.c ktree.c klist.h ktree.h
ckdb_LDADD = libckpool.a @JANSSON_LIBS@ @LIBS@
endif
install-exec-hook: install-exec-hook:
$(LN_S) -f ckpool $(DESTDIR)$(bindir)/ckproxy $(LN_S) -f ckpool $(DESTDIR)$(bindir)/ckproxy

Loading…
Cancel
Save