From c4b294c890c28004d33f650b7af5064c4099f608 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 27 Apr 2016 03:51:42 +0200 Subject: blogc-runserver: import external tool to blogc repository still in the effort to reduce maintenance work, I'm importing blogc-runserver tool to the main blogc repository. the tool is build by default, if needed headers and libraries are found. --- configure.ac | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 858db59..b468d4b 100644 --- a/configure.ac +++ b/configure.ac @@ -137,6 +137,34 @@ AS_IF([test "x$have_git_receiver" = "xyes"], , [ ]) AM_CONDITIONAL([BUILD_GIT_RECEIVER], [test "x$have_git_receiver" = "xyes"]) +RUNSERVER="disabled" +AC_ARG_ENABLE([runserver], AS_HELP_STRING([--disable-runserver], + [disable blogc-runserver build])) +AS_IF([test "x$enable_runserver" != "xno"], [ + AC_CHECK_LIB(magic, [magic_open], [ + MAGIC_LIBS="-lmagic" + PKG_CHECK_MODULES([LIBEVENT], [libevent >= 2.0], [ + AC_CHECK_HEADERS([sys/types.h sys/stat.h signal.h stdarg.h fcntl.h unistd.h magic.h], [ + AC_SUBST(MAGIC_LIBS) + RUNSERVER="enabled" + have_runserver=yes + ], [ + have_runserver=no + ]) + ], [ + have_runserver=no + ]) + ], [ + have_runserver=no + ]) +]) +AS_IF([test "x$have_runserver" = "xyes"], , [ + AS_IF([test "x$enable_runserver" = "xyes"], [ + AC_MSG_ERROR([blogc-runserver requested but required dependencies not found]) + ]) +]) +AM_CONDITIONAL([BUILD_RUNSERVER], [test "x$have_runserver" = "xyes"]) + AC_CHECK_HEADERS([sys/types.h sys/stat.h time.h]) LT_LIB_M @@ -160,6 +188,7 @@ AS_ECHO(" ldflags: ${LDFLAGS} blogc-git-receiver: ${GIT_RECEIVER} + blogc-runserver: ${RUNSERVER} tests: ${TESTS} -- cgit v1.2.3-18-g5258