commit af15474448e4ccafd4c05d2963d2131db33d92bb from: Omar Polo date: Wed Jul 07 08:38:19 2021 UTC always append LDFLAGS and CFLAGS Initial patch from Anna "CyberTailor", tweaked by me (drop guessing_* and always append CFLAGS) commit - 321341f6c09b8d51f6ed137833300af5417a3b61 commit + af15474448e4ccafd4c05d2963d2131db33d92bb blob - 2cfcff2238759a428e3adb09f53b86ffb4d4af6d blob + 4e1bccd48ceddbb22657271c442b41fcc87fe3a4 --- configure +++ 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