aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-04-27 03:51:42 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-04-27 03:51:42 +0200
commitc4b294c890c28004d33f650b7af5064c4099f608 (patch)
tree5ea09b812092670243cc186e6233c8483acac7eb /configure.ac
parent6f975248895d0300c6fd8783b1138bdd4be00bcc (diff)
downloadblogc-c4b294c890c28004d33f650b7af5064c4099f608.tar.gz
blogc-c4b294c890c28004d33f650b7af5064c4099f608.tar.bz2
blogc-c4b294c890c28004d33f650b7af5064c4099f608.zip
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac29
1 files changed, 29 insertions, 0 deletions
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}