pkg-config file does not contain the right libraries under windows
originally sent in gnutls-devel
I'm cross-compiling FFmpeg with GnuTLS (on Windows using Cygwin, MinGW and GCC) for TLS 1.2 support.
Without intervention FFmpeg's configure would always fail:
...
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: GnuTLS
Description: Transport Security Layer implementation for the GNU system
URL: http://www.gnutls.org/
Version: @VERSION@
Libs: -L${libdir} -lgnutls
Libs.private: @LIBINTL@ @LIBSOCKET@ @LIBNSL@ @LIBPTHREAD@ @LIB_SELECT@ @TSS_LIBS@ @GMP_LIBS@ @LIBUNISTRING@ @LIBIDN2_LIBS@ -lcrypt32
@GNUTLS_REQUIRES_PRIVATE@
Cflags: -I${includedir}
or configure FFmpeg with --extra-libs=-lcrypt32 to correct this.
In 'lib/Makefile.am' I did notice:
if WINDOWS
thirdparty_libadd += -lcrypt32
endif
and in 'lib/.libs/libgnutls.lai' I did notice:
# Libraries that this one depends upon.
dependency_libs=' -lws2_32 -L/cygdrive/m/[...]/i686-w64-mingw32/lib -lhogweed -lnettle /cygdrive/m/[...]/i686-w64-mingw32/lib/libgmp.la -lcrypt32'
but as FFmpeg only checks the pkg-config file, I believe 'gnutls.pc.in' is this case is in need of an update.