diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2018-09-26 12:46:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-26 12:46:28 +0200 |
commit | c1b02322653f8474c6dc077f33f016d68f54406b (patch) | |
tree | d79203405b885b533db58455a77a344c6de98a65 /build/m4/tcmalloc.m4 | |
parent | 465d375c5096421254c6e331394bf6d69ab36db9 (diff) |
reproducible build system (#4294)
- Move `m4` dir to `build/m4` to clean TLD
- create `build/build.sh` script which builds netdata in docker container
- create `build/Dockerfile` which creates reproducible build environment
- exclude `.lgtm.yml` from final package
- use `.tar.gz` package in `netdata.spec.in` as `*.xz` and `*.bz2` will be removed due to #3913
What it does is simple, you don't need any libraries installed on host to build netdata as they are provided inside a container.
Diffstat (limited to 'build/m4/tcmalloc.m4')
-rw-r--r-- | build/m4/tcmalloc.m4 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/build/m4/tcmalloc.m4 b/build/m4/tcmalloc.m4 new file mode 100644 index 0000000000..765d2accc9 --- /dev/null +++ b/build/m4/tcmalloc.m4 @@ -0,0 +1,45 @@ +dnl -------------------------------------------------------- -*- autoconf -*- +dnl SPDX-License-Identifier: Apache-2.0 + +dnl +dnl tcmalloc.m4: Trafficserver's tcmalloc autoconf macros +dnl modified to skip other TS_ helpers +dnl + +dnl This is kinda fugly, but need a way to both specify a directory and which +dnl of the many tcmalloc libraries to use ... +AC_DEFUN([TS_CHECK_TCMALLOC], [ +AC_ARG_WITH([tcmalloc-lib], + [AS_HELP_STRING([--with-tcmalloc-lib],[specify the tcmalloc library to use [default=tcmalloc]])], + [ + with_tcmalloc_lib="$withval" + ],[ + with_tcmalloc_lib="tcmalloc" + ] +) + +has_tcmalloc=0 +AC_ARG_WITH([tcmalloc], [AS_HELP_STRING([--with-tcmalloc=DIR], [use the tcmalloc library])], +[ + if test "$withval" != "no"; then + if test "x${enable_jemalloc}" = "xyes"; then + AC_MSG_ERROR([Cannot compile with both tcmalloc and jemalloc]) + fi + tcmalloc_have_lib=0 + if test "x$withval" != "xyes" && test "x$withval" != "x"; then + tcmalloc_ldflags="$withval/lib" + LDFLAGS="${LDFLAGS} -L${tcmalloc_ldflags}" + LIBTOOL_LINK_FLAGS="${LIBTOOL_LINK_FLAGS} -rpath ${tcmalloc_ldflags}" + fi + AC_CHECK_LIB(${with_tcmalloc_lib}, tc_cfree, [tcmalloc_have_lib=1]) + if test "$tcmalloc_have_lib" != "0"; then + LIBS="${LIBS} -l${with_tcmalloc_lib}" + has_tcmalloc=1 + AC_DEFINE(has_tcmalloc, [1], [Link/compile against tcmalloc]) + else + AC_MSG_ERROR([Couldn't find a tcmalloc installation]) + fi + fi +]) +AC_SUBST(has_tcmalloc) +]) |