logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/
commit: d810dd53e756680bbe62e639e5893a503c40a377
parent dc589c8621613ea2eb39939547c3b50b02bc5630
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Wed, 18 Dec 2024 10:21:11 +0100

configure: check -Werror=implicit-function-declaration prior to check_conftest

So far haven't been a problem but better be safe than sorry.

Diffstat:

Mconfigure6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure @@ -100,7 +100,7 @@ check_conftest() { printf 'Checking if conftest %s compiles ...' "$conftest" - ${CC} ${CFLAGS} -Werror=implicit-function-declaration -c -o "${conftest}.bin" "${conftest}" 2>&1 + ${CC} ${CFLAGS} ${CFLAGS_CHECK} -c -o "${conftest}.bin" "${conftest}" 2>&1 is_ok rm "${conftest}.bin" @@ -109,7 +109,7 @@ check_conftest() { check_cflag() { printf "checking whether compiler accepts %s... " "$@" - ${CC} ${CFLAGS} "$@" -c -o "configure.d/cflag_test.bin" "configure.d/cflag_test.c" 2>&1 + ${CC} ${CFLAGS} ${CFLAGS_CHECK} "$@" -c -o "configure.d/cflag_test.bin" "configure.d/cflag_test.c" 2>&1 is_ok rm "configure.d/cflag_test.bin" @@ -211,6 +211,8 @@ fi echo +check_cflag "-Werror=implicit-function-declaration" && CFLAGS_CHECK="${CFLAGS_CHECK} -Werror=implicit-function-declaration" + check_cflag -Wwrite-strings && CFLAGS="${CFLAGS} -Wwrite-strings" if ! check_header mntent.h; then