aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2021-07-07 08:38:19 +0000
committerOmar Polo <op@omarpolo.com>2021-07-07 08:38:19 +0000
commitaf15474448e4ccafd4c05d2963d2131db33d92bb (patch)
treeae287ff33201c0863518bdb72507721addb64737 /configure
parent321341f6c09b8d51f6ed137833300af5417a3b61 (diff)
always append LDFLAGS and CFLAGS
Initial patch from Anna "CyberTailor", tweaked by me (drop guessing_* and always append CFLAGS)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 2 insertions, 10 deletions
diff --git a/configure b/configure
index 2cfcff2..4e1bccd 100755
--- a/configure
+++ b/configure
@@ -36,17 +36,13 @@ echo "file config.log: writing..."
CC=`printf "all:\\n\\t@echo \\\$(CC)\\n" | make ${MAKE_FLAGS} -sf -`
-guessing_cflags=0
if [ -z "${CFLAGS}" ]; then
- guessing_cflags=1
CFLAGS=`printf "all:\\n\\t@echo \\\$(CFLAGS)\\n" | make ${MAKE_FLAGS} -sf -`
CFLAGS="${CFLAGS} -W -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes"
CFLAGS="${CFLAGS} -Wwrite-strings -Wno-unused-parameter"
fi
-guessing_ldflags=0
if [ -z "${LDFLAGS}" ]; then
- guessing_ldflags=1
LDFLAGS=`printf "all:\\n\\t@echo \\\$(LDFLAGS)\\n" | make ${MAKE_FLAGS} -sf -`
LDFLAGS="-ltls -levent -lcrypto"
fi
@@ -66,15 +62,11 @@ BINDIR=
INSTALL="install"
add_cflags() {
- if [ $guessing_cflags = 1 ]; then
- CFLAGS="${CFLAGS} $1"
- fi
+ CFLAGS="${CFLAGS} $1"
}
add_ldflags() {
- if [ $guessing_ldflags = 1 ]; then
- LDFLAGS="${LDFLAGS} $1"
- fi
+ LDFLAGS="${LDFLAGS} $1"
}
# try to auto detect CFLAGS and LDFLAGS