aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 02:29:54 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-12-27 02:43:59 +0100
commit8cac2c3e3a61b64b9a9855dec413239bcec7f9d2 (patch)
tree6240cdabaa0352f08d62bbfa6de7c53f5a3f1063 /configure.ac
parent7bf68b0b617fb3ffa86f38fe06a49786883037f4 (diff)
downloadblogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.tar.gz
blogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.tar.bz2
blogc-8cac2c3e3a61b64b9a9855dec413239bcec7f9d2.zip
make: implemented a build tool for blogc
so, this is basically what happens when you don't have anything better to do in the christmas weekend. most of this code was written in the last 2 or 3 days. i'd like to thank the chivas brothers, the weather and my psychological problems for this achievement. on a serious note, this tool still needs a man page, more tests, and the aws lambda function should be adapted to use it instead of (or together with) make/busybox. also, while talking about aws lambda, this tool can be nicely embedded into the blogc binary, to produce a single "small" static binary for usage in lambda ;)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b7abf15..cc08106 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,6 +97,29 @@ AS_IF([test "x$enable_git_receiver" = "xyes"], [
])
AM_CONDITIONAL([BUILD_GIT_RECEIVER], [test "x$have_git_receiver" = "xyes"])
+MAKE_="disabled"
+AC_ARG_ENABLE([make-embedded], AS_HELP_STRING([--enable-make-embedded],
+ [build blogc-make tool embedded on blogc binary]))
+AC_ARG_ENABLE([make], AS_HELP_STRING([--enable-make],
+ [build blogc-make tool]))
+AS_IF([test "x$enable_make" = "xyes" -o "x$enable_make_embedded" = "xyes"], [
+ AX_PTHREAD([], [
+ AC_MSG_ERROR([blogc-make tool requested but pthread is not supported])
+ ])
+ have_make_lib=yes
+ AS_IF([test "x$enable_make_embedded" = "xyes"], [
+ MAKE_="enabled (embedded)"
+ have_make_embedded=yes
+ AC_DEFINE([MAKE_EMBEDDED], [], [Build blogc-make embedded to blogc binary])
+ ], [
+ MAKE_="enabled"
+ have_make=yes
+ ])
+])
+AM_CONDITIONAL([BUILD_MAKE], [test "x$have_make" = "xyes"])
+AM_CONDITIONAL([BUILD_MAKE_LIB], [test "x$have_make_lib" = "xyes"])
+AM_CONDITIONAL([BUILD_MAKE_EMBEDDED], [test "x$have_make_embedded" = "xyes"])
+
RUNSERVER="disabled"
AC_ARG_ENABLE([runserver], AS_HELP_STRING([--enable-runserver],
[build blogc-runserver tool]))
@@ -219,6 +242,7 @@ AS_ECHO("
ldflags: ${LDFLAGS}
blogc-git-receiver: ${GIT_RECEIVER}
+ blogc-make: ${MAKE_}
blogc-runserver: ${RUNSERVER}
tests: ${TESTS}