mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Debian bug 529821: Use pkg-config, not libgnutls-config
The configure script used to run libgnutls-config in order to find the compiler and linker options needed for using GNUTLS, but GNUTLS 2.7 apparently doesn't ship that script any more. Use pkg-config instead. GNUTLS 1.2.0 is the oldest version supported by ELinks, and that already installs the gnutls.pc file required by pkg-config. This commit also removes support for configure --with-gnutls=DIR. The configure script used to look for libgnutls-config in DIR. DIR thus had to be a directory where executable programs were installed, and it's unlikely that gnutls.pc would be found there. So, any callers that used this feature would have to be changed anyway, and they can as well be changed to set the PKG_CONFIG_PATH environment variable instead.
This commit is contained in:
parent
feb640f29c
commit
f8bbf1a227
2
NEWS
2
NEWS
@ -14,6 +14,8 @@ includes the changes listed under ``ELinks 0.11.6.GIT now'' below.
|
||||
* critical bug 1071: Fix crash in get_dom_node_child.
|
||||
* Debian build bug 526349: Include asciidoc.py from AsciiDoc 7.1.2,
|
||||
to remove all dependencies on the installed version.
|
||||
* Debian build bug 529821: Use ``pkg-config gnutls'' instead of
|
||||
``libgnutls-config'', which is not included in GNUTLS 2.7.x.
|
||||
* build enhancement: Recognize ``configure --without-tre''.
|
||||
|
||||
ELinks 0.12pre3:
|
||||
|
108
configure.in
108
configure.in
@ -1005,15 +1005,14 @@ disable_openssl=""
|
||||
disable_gnutls=""
|
||||
enable_gnutls=""
|
||||
|
||||
AC_ARG_WITH(gnutls, [ --without-gnutls disable GNUTLS SSL support],
|
||||
[if test "$with_gnutls" = no; then disable_gnutls=yes; fi])
|
||||
AC_ARG_WITH(gnutls, [[ --with-gnutls[=DIR] enable GNUTLS SSL support]],
|
||||
[if test "$with_gnutls" != no; then enable_gnutls=yes; fi])
|
||||
gnutls_withval="$withval"
|
||||
|
||||
if test "$enable_gnutls" = yes; then
|
||||
disable_openssl=yes;
|
||||
fi
|
||||
AC_ARG_WITH(gnutls, [[ --without-gnutls disable GNUTLS SSL support]])
|
||||
AC_ARG_WITH(gnutls, [[ --with-gnutls enable GNUTLS SSL support]],
|
||||
[case "$with_gnutls" in
|
||||
"no") disable_gnutls=yes;;
|
||||
"yes") enable_gnutls=yes; disable_openssl=yes;;
|
||||
*) AC_MSG_WARN([[Support for --with-gnutls=DIR has been removed.
|
||||
You may have to set the PKG_CONFIG_PATH environment variable instead.]]);;
|
||||
esac])
|
||||
|
||||
AC_ARG_WITH(openssl, [ --without-openssl disable OpenSSL support],
|
||||
[if test "$with_openssl" = no; then disable_openssl=yes; fi])
|
||||
@ -1072,68 +1071,55 @@ AC_MSG_RESULT($cf_result)
|
||||
|
||||
CONFIG_GNUTLS_OPENSSL_COMPAT=no
|
||||
# ---- GNU TLS
|
||||
dnl We can't have AC_MSG_CHECKING here, because AC_PATH_PROG prints its own and
|
||||
dnl it looks ugly then.
|
||||
|
||||
if test "$cf_result" = yes; then
|
||||
cf_result="not used"
|
||||
AC_MSG_CHECKING([[for GNUTLS]])
|
||||
AC_MSG_RESULT([[not used, because OpenSSL was chosen]])
|
||||
|
||||
elif test -n "$disable_gnutls"; then
|
||||
AC_MSG_CHECKING([[for GNUTLS]])
|
||||
AC_MSG_RESULT([[explicitly disabled]])
|
||||
|
||||
else
|
||||
EL_SAVE_FLAGS
|
||||
cf_result="no"
|
||||
cf_result=no
|
||||
AC_MSG_CHECKING([[for GNUTLS (1.2 or later) in pkg-config]])
|
||||
if pkg-config --atleast-version=1.2 gnutls; then
|
||||
GNUTLS_CFLAGS=`pkg-config --cflags gnutls`
|
||||
GNUTLS_LIBS=`pkg-config --libs gnutls`
|
||||
AC_MSG_RESULT([[yes: $GNUTLS_CFLAGS $GNUTLS_LIBS]])
|
||||
|
||||
if test -z "$disable_gnutls"; then
|
||||
# Sure, we maybe _could_ use their macro, but how to ensure
|
||||
# that the ./configure script won't fail if the macro won't be
|
||||
# found..? :( --pasky
|
||||
# Verify if it's really usable. gnutls_session was
|
||||
# renamed to gnutls_session_t before GNU TLS 1.2.0
|
||||
# (on 2004-06-13); ELinks now requires this.
|
||||
AC_MSG_CHECKING([[whether GNUTLS can be linked with]])
|
||||
EL_SAVE_FLAGS
|
||||
LIBS="$GNUTLS_LIBS $LIBS"
|
||||
CFLAGS="$CFLAGS $GNUTLS_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS $GNUTLS_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]],
|
||||
[[gnutls_session_t dummy;
|
||||
gnutls_check_version(NULL)]])],
|
||||
[cf_result=yes],
|
||||
[cf_result=no])
|
||||
EL_RESTORE_FLAGS
|
||||
fi
|
||||
# This can match either AC_MSG_CHECKING above. A bit hacky...
|
||||
AC_MSG_RESULT([[$cf_result]])
|
||||
|
||||
GNUTLS_PATH="$PATH:/usr/local/gnutls:/opt:/opt/gnutls"
|
||||
if test "$cf_result" = yes; then
|
||||
EL_CONFIG(CONFIG_GNUTLS, [GNUTLS])
|
||||
|
||||
if test -d "$gnutls_withval"; then
|
||||
GNUTLS_PATH="$gnutls_withval:$GNUTLS_PATH"
|
||||
fi
|
||||
LIBS="$GNUTLS_LIBS $LIBS"
|
||||
AC_SUBST(GNUTLS_CFLAGS)
|
||||
|
||||
AC_PATH_PROG(LIBGNUTLS_CONFIG, libgnutls-config, no, $GNUTLS_PATH)
|
||||
|
||||
if test "$LIBGNUTLS_CONFIG" = "no" ; then
|
||||
cf_result=no
|
||||
else
|
||||
GNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG --cflags`
|
||||
GNUTLS_LIBS=`$LIBGNUTLS_CONFIG --libs`
|
||||
|
||||
LIBS="$GNUTLS_LIBS $LIBS_X"
|
||||
CFLAGS="$CFLAGS_X $GNUTLS_CFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS_X $GNUTLS_CFLAGS"
|
||||
|
||||
# Verify if it's really usable. gnutls_session was
|
||||
# renamed to gnutls_session_t before GNU TLS 1.2.0
|
||||
# (on 2004-06-13); ELinks now requires this.
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <gnutls/gnutls.h>]], [[gnutls_session_t dummy;
|
||||
gnutls_check_version(NULL)]])],[cf_result=yes],[cf_result=no])
|
||||
fi
|
||||
|
||||
if test "$cf_result" = yes; then
|
||||
EL_CONFIG(CONFIG_GNUTLS, [GNUTLS])
|
||||
|
||||
CFLAGS="$CFLAGS_X"
|
||||
AC_SUBST(GNUTLS_CFLAGS)
|
||||
|
||||
# GnuTLS 2.2.0 changed libgnutls-openssl from GPLv2+
|
||||
# to GPLv3+. Don't link that with the GPLv2 ELinks.
|
||||
# ELinks will use its internal MD5 code instead.
|
||||
CONFIG_GNUTLS_OPENSSL_COMPAT=no
|
||||
else
|
||||
if test -n "$gnutls_withval" && test "x$gnutls_withval" != xno; then
|
||||
AC_MSG_ERROR([GNUTLS (1.2 or later) not found. ELinks no longer supports GNUTLS 1.1.])
|
||||
fi
|
||||
EL_RESTORE_FLAGS
|
||||
fi
|
||||
# GnuTLS 2.2.0 changed libgnutls-openssl from GPLv2+
|
||||
# to GPLv3+. Don't link that with the GPLv2 ELinks.
|
||||
# ELinks will use its internal MD5 code instead.
|
||||
CONFIG_GNUTLS_OPENSSL_COMPAT=no
|
||||
elif test "${with_gnutls-no}" != "no"; then
|
||||
AC_MSG_ERROR([[GNUTLS (1.2 or later) not found. ELinks no longer supports GNUTLS 1.1.]])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for GNU TLS (1.2 or later)])
|
||||
AC_MSG_RESULT($cf_result)
|
||||
|
||||
# Final SSL setup
|
||||
|
||||
EL_CONFIG_DEPENDS(CONFIG_SSL, [CONFIG_OPENSSL CONFIG_GNUTLS], [SSL])
|
||||
|
Loading…
Reference in New Issue
Block a user