From 4706c6d4ff06b8f565660f5b6801bf9efb652f88 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 31 Mar 2022 14:33:08 +0200 Subject: [PATCH] configure: do not overwrite LDFLAGS in test for 32-bit libsensors --- configure | 4 +++- configure.in | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure b/configure index aa5af95..e999217 100755 --- a/configure +++ b/configure @@ -4783,7 +4783,8 @@ HAVE_SENSORS32="n" if test $SENSORS_SUPPORT = "y"; then CFLAGS_SAVE=$CFLAGS CFLAGS+=" -m32" - LDFLAGS=" -lsensors" + LDFLAGS_SAVE=$LDFLAGS + LDFLAGS+=" -lsensors" SENSORS=no # Check for another function to avoid using cached result { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sensors_cleanup in -lsensors" >&5 @@ -4852,6 +4853,7 @@ rm -f core conftest.err conftest.$ac_objext \ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SENSORS" >&5 $as_echo "$SENSORS" >&6; } CFLAGS=$CFLAGS_SAVE + LDFLAGS=$LDFLAGS_SAVE fi diff --git a/configure.in b/configure.in index 279347a..11cb3a3 100644 --- a/configure.in +++ b/configure.in @@ -191,7 +191,8 @@ HAVE_SENSORS32="n" if test $SENSORS_SUPPORT = "y"; then CFLAGS_SAVE=$CFLAGS CFLAGS+=" -m32" - LDFLAGS=" -lsensors" + LDFLAGS_SAVE=$LDFLAGS + LDFLAGS+=" -lsensors" SENSORS=no # Check for another function to avoid using cached result AC_CHECK_LIB(sensors, sensors_cleanup, LFSENSORS32="-lsensors", HAVE_SENSORS32="n") @@ -201,6 +202,7 @@ if test $SENSORS_SUPPORT = "y"; then [[sensors_cleanup();]])], SENSORS=yes; HAVE_SENSORS32="y"; DFSENSORS32="-DHAVE_SENSORS32", HAVE_SENSORS32="n"; SENSORS=no) AC_MSG_RESULT($SENSORS) CFLAGS=$CFLAGS_SAVE + LDFLAGS=$LDFLAGS_SAVE fi AC_SUBST(HAVE_SENSORS32) AC_SUBST(LFSENSORS32) -- 2.40.0