Trying to pass an extra library to configure using LIBS, as configure --help says I can, I found it did nothing, and traced it to src/Makefile.in, which deliberately ignores LIBS. This dates back 14 years, and whatever it was intended to fix no longer seems to be a problem. May I install the following patch? With the patch applied, supplying LIBS on the configure command-line worked exactly as it should.
--- src/Makefile.in 2014-07-13 15:50:35 +0000
+++ src/Makefile.in 2014-08-09 11:34:12 +0000
@@ -44,10 +44,7 @@
# BSD doesn't have it as a default.
MKDIR_P = @MKDIR_P@
-# Don't use LIBS. configure puts stuff in it that either shouldn't be
-# linked with Emacs or is duplicated by the other stuff below.
-# LIBS = @LIBS@
-LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
lispsource = $(top_srcdir)/lisp
lib = ../lib
@@ -388,7 +385,7 @@
## List of object files that make-docfile should not be told about.
otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \
- $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS)
+ $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBS)
## All object files linked into temacs. $(VMLIMIT_OBJ) should be first.
## (On MinGW, firstfile.o should be before vm-limit.o.)