According to autoconf's documentation [1], we shouldn't be using
LDFLAGS to pass library names to the linker; instead LIBS should be
used. According to [2], LIBS is automatically set if the third
argument of AC_CHECK_LIB is not specified so remove the third argument
if passing the library name to the linker is the only thing that
happens; otherwise, change LDFLAGS to LIBS.
According to autoconf's documentation [1], we shouldn't be using LDFLAGS to pass library names to the linker; instead LIBS should be used. According to [2], LIBS is automatically set if the third argument of AC_CHECK_LIB is not specified so remove the third argument if passing the library name to the linker is the only thing that happens; otherwise, change LDFLAGS to LIBS.
[1] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Preset-Output-Variables.html [2] https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Libraries.html