On Monday 15 December 2014 14:38:11 Jochen Roderburg wrote: > Am 15.12.2014 um 13:20 schrieb Jochen Roderburg: > > Am 14.12.2014 um 17:30 schrieb Tim Rühsen: > >> I appreciate any help in finding an example. > >> Else we have to amend the documentation... I already made up a patch > >> for the > >> docs, but I am willing to wait a while before I push it. > > > > Hmm, I thought, there were many of these around. ;-) > > I'll have a look on my disk if I see something suitable in sources that > > I have downloaded. > > Well, I did not find exactly what I was looking for, but the following: > > For a library LIBXXX, which is handled by pkg-config, the pkg-config > result can be overriden by (environment) variables LIBXXX_CFLAGS and > LIBXXX_LIBS (they are all now mentioned in configure --help ;-)
That is not so easy, since when having --with-libssl-prefix=/usr/local/ssl, you can't just OPENSSL_CFLAGS=$with_libssl_prefix/include OPENSSL_LIBS=$with_libssl_prefix/lib You also have to manually specify the libraries you want to link with... this can be different on different systems. > So it should be sufficient to set such variables somewhere in the > configure script, when wget's own --with-libxxx-prefix option is set. > And it looks like the currently only affected options are those for the > SSL libraries, namely --with-libssl-prefix (for openssl) and > --with-libgnutls-prefix (for gnutls). So I decided to set PKG_CONFIG_PATH before the check and unset it afterwards. It works for me... but I failed to test it without pkg-config. Without pkg- config I couldn't get autoreconf working :-( Please give the patch a try and report back. Tim
From 05e3eeef1103cf8b0b7c4b4709175e0d978a28dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim Rühsen?= <[email protected]> Date: Tue, 16 Dec 2014 14:38:50 +0100 Subject: [PATCH] configure.ac: Let --with-libssl-prefix work with pkg-config --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure.ac b/configure.ac index 7b4e2ad..8c9e440 100644 --- a/configure.ac +++ b/configure.ac @@ -334,6 +334,9 @@ AS_IF([test x"$with_zlib" != xno], [ ]) AS_IF([test x"$with_ssl" = xopenssl], [ + if [test x"$with_libssl_prefix" != x]; then + export PKG_CONFIG_PATH=$with_libssl_prefix/lib/pkgconfig + fi PKG_CHECK_MODULES([OPENSSL], [openssl], [ AC_MSG_NOTICE([compiling in support for SSL via OpenSSL]) AC_LIBOBJ([openssl]) @@ -398,12 +401,19 @@ AS_IF([test x"$with_ssl" = xopenssl], [ fi ]) ]) + if [test x"$with_libssl_prefix" != x]; then + unset PKG_CONFIG_PATH + fi ], [ # --with-ssl is not openssl: check if it's no AS_IF([test x"$with_ssl" != xno], [ dnl default is -lgnutls with_ssl=gnutls + if [test x"$with_libgnutls_prefix" != x]; then + export PKG_CONFIG_PATH=$with_libgnutls_prefix/lib/pkgconfig + fi + dnl Now actually check for -lgnutls PKG_CHECK_MODULES([GNUTLS], [gnutls], [ AC_MSG_NOTICE([compiling in support for SSL via GnuTLS]) @@ -425,6 +435,9 @@ AS_IF([test x"$with_ssl" = xopenssl], [ AC_MSG_ERROR([GnuTLS has not been found. Use --with-ssl=openssl if you explicitly want OpenSSL.]) fi ]) + if [test x"$with_libgnutls_prefix" != x]; then + unset PKG_CONFIG_PATH + fi AC_CHECK_FUNCS(gnutls_priority_set_direct) ]) # endif: --with-ssl != no? -- 2.1.3
signature.asc
Description: This is a digitally signed message part.
