on some systems, pan requires linking against libiconv
The build fails on macosx for example, unless -liconv is added manually to the LDFLAGS. But this should not be necessary, as configure already sorts this out.
To look into why this was not working, I referenced this:
https://www.gnu.org/software/libiconv/
and following those instructions to add @LIBICONV@
to the pan_LDADD
libraries, I added this small patch to pan/gui/Makefile.am:
% cat patch-pan2-libiconv-linking.diff
--- pan/gui/Makefile.am.orig 2023-10-23 08:33:10
+++ pan/gui/Makefile.am 2023-10-23 08:33:27
@@ -103,7 +103,7 @@
pan_SOURCES = gui.cc pan.cc $(WINRC)
pan_LDADD = ./libpangui.a ../data-impl/libpandata.a ../tasks/libtasks.a ../data/libdata.a ../usenet-utils/libusenetutils.a ../general/libgeneralutils.a ../../uulib/libuu.a \
- @GTKSPELL_LIBS@ @ENCHANT_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ @GNUTLS_LIBS@ @LIBNOTIFY_LIBS@ @LIBGNOME_KEYRING_1_LIBS@ @WEBKITGTK_LIBS@ @ZLIB_LIBS@ ${WINLIBS}
+ @GTKSPELL_LIBS@ @ENCHANT_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ @GNUTLS_LIBS@ @LIBNOTIFY_LIBS@ @LIBGNOME_KEYRING_1_LIBS@ @WEBKITGTK_LIBS@ @ZLIB_LIBS@ @LIBICONV@ ${WINLIBS}
if HAVE_WIN32
pan_LDFLAGS = -mwindows
endif
After that, -liconv was appropriately added to the link libraries and the build succeeded.
I notice the windows build has been manually adding -liconv to the link flags -- perhaps with this change, that would no longer be needed? I don't use mingw so I can't confirm that.
I haven't tested this on linux as of yet, but I presume on linux configure sets @LIBICONV@
to an empty string.
Thanks!