summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorPaul Emm. Katsoulakis <34388743+paulkatsoulakis@users.noreply.github.com>2020-01-02 23:34:22 +0100
committerJames Mills <1290234+prologic@users.noreply.github.com>2020-01-03 08:34:22 +1000
commitc7ea25076270a9f68fc8db8b75c71280776861ae (patch)
treef9bdedb274787423c114ffe5f427d15d4564e239 /netdata-installer.sh
parent16b6ad2e48449c3afe92f458ace9a67868a4db2c (diff)
netdata/installer: Make netdata installer more flexible, to accommodate install with ssl on MacOS (#6922)
* netdata/packaging: allow passing of LDFLAGS, together with CFLAGS * netdata/packaging: add instructions for mac * Update packaging/installer/README.md Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * Update packaging/installer/README.md Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * Update packaging/installer/README.md Co-Authored-By: Joel Hans <joel.g.hans@gmail.com> * netdata/docs: fix doc as per feedback Co-authored-by: Joel Hans <joel.g.hans@gmail.com>
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 601549d049..051aa09266 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -80,6 +80,7 @@ umask 002
renice 19 $$ >/dev/null 2>/dev/null
# you can set CFLAGS before running installer
+LDFLAGS="${LDFLAGS}"
CFLAGS="${CFLAGS--O2}"
[ "z${CFLAGS}" = "z-O3" ] && CFLAGS="-O2"
@@ -88,6 +89,7 @@ CFLAGS="${CFLAGS--O2}"
printf "\\n# " >>netdata-installer.log
date >>netdata-installer.log
printf 'CFLAGS="%s" ' "${CFLAGS}" >>netdata-installer.log
+printf 'LDFLAGS="%s" ' "${LDFLAGS}" >>netdata-installer.log
printf "%q " "${PROGRAM}" "${@}" >>netdata-installer.log
printf "\\n" >>netdata-installer.log
@@ -187,6 +189,14 @@ If you need to pass different CFLAGS, use something like this:
CFLAGS="<gcc options>" ${PROGRAM} [options]
+If you also need to provide different LDFLAGS, use something like this:
+
+ LDFLAGS="<extra ldflag options>" ${PROGRAM} [options]
+
+or use the following if both LDFLAGS and CFLAGS need to be overriden:
+
+ CFLAGS="<gcc options>" LDFLAGS="<extra ld options>" ${PROGRAM} [options]
+
For the installer to complete successfully, you will need these packages installed:
gcc make autoconf automake pkg-config zlib1g-dev (or zlib-devel) uuid-dev (or libuuid-devel)
@@ -422,7 +432,7 @@ run ./configure \
--with-math \
--with-user=netdata \
${NETDATA_CONFIGURE_OPTIONS} \
- CFLAGS="${CFLAGS}" || exit 1
+ CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" || exit 1
# remove the build_error hook
trap - EXIT
@@ -1083,6 +1093,7 @@ cat <<EOF > "${NETDATA_USER_CONFIG_DIR}/.environment"
# Created by installer
PATH="${PATH}"
CFLAGS="${CFLAGS}"
+LDFLAGS="${LDFLAGS}"
NETDATA_PREFIX="${NETDATA_PREFIX}"
NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS}"
NETDATA_ADDED_TO_GROUPS="${NETDATA_ADDED_TO_GROUPS}"