File libduo-no_static.diff of Package duo_unix

Upstream changed libduo to link statically in 1.9.20 (6aa22ba), ostensibly
due to user issues after upgrading.  That should not be a problem here with
RPM %post{,un} scripts which call ldconfig.

Revert that change to comply with SUSE policy; this requires running automake
afterwards (unfortunately the resulting change to Makefile.in is too invasive
to just patch that file directly).  Additionally the close_config symbol (added
after this static linking change) must be exported for the build to function.
--- lib/Makefile.am~	2022-02-02 09:50:33.000000000 -0600
+++ lib/Makefile.am	2023-01-24 15:15:03.681088469 -0600
@@ -9,14 +9,14 @@

 AM_CPPFLAGS = -I$(top_srcdir)/compat @OPENSSL_INCLUDES@

-noinst_LTLIBRARIES = libduo.la
+lib_LTLIBRARIES = libduo.la

 libduo_la_SOURCES = cacert.h duo.c \
 		    http_parser.h http_parser.c https.h https.c ini.h ini.c \
 		    urlenc.h urlenc.c util.c parson.h parson.c
-libduo_la_LIBADD = @OPENSSL_LDFLAGS@ @OPENSSL_LIBS@
+libduo_la_LIBADD = $(top_builddir)/compat/libcompat.la @OPENSSL_LDFLAGS@ @OPENSSL_LIBS@
 # http://sourceware.org/autobook/autobook/autobook_91.html
-libduo_la_LDFLAGS = -no-undefined -version-info 3:0:0 -export-symbols-regex '^duo_'
+libduo_la_LDFLAGS = -no-undefined -version-info 3:0:0 -export-symbols-regex '^(duo_|close_config)'

 libduo_la_includedir = $(includedir)
 libduo_la_include_HEADERS = duo.h duo_private.h util.h shell.h
openSUSE Build Service is sponsored by