Commit bb196607 authored by Jehan's avatar Jehan
Browse files

configure: add hard dependency on glib-networking.

Use a code test inspired by libsoup configure test.
This is a hard dependency because HTTPS should not be considered an
option anymore. Nowadays most websites will use HTTPS by default, HTTP
gives SEO penalties and browsers are starting to display various
security warnings on HTTP websites.
Also the experience will be significantly degraded without SSL/TLS
support since the help browser will fail to load the manual remotely,
and opening various remote files on secure protocols will fail.
Note: the test cannot be performed while cross-compiling. In this case,
we will just display a warning for packagers to be at least well aware
of this dependency.
parent 0c98028f
......@@ -673,6 +673,33 @@ else
[add_deps_error([gio-unix-2.0])])
fi
AC_MSG_CHECKING([for glib-networking (GIO TLS implementation)])
gimp_save_CFLAGS="$CFLAGS"
gimp_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GIO_CFLAGS"
LIBS="$LIBS $GIO_LIBS"
AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <gio/gio.h>],
[return !g_tls_backend_supports_tls (g_tls_backend_get_default ());])],
[have_glib_networking="yes"],
[have_glib_networking="no"],
[have_glib_networking="unknown (cross-compiling)"])
CFLAGS="$gimp_save_CFLAGS"
LIBS="$gimp_save_LIBS"
AC_MSG_RESULT($have_glib_networking)
if test "x$have_glib_networking" = "xno"; then
add_deps_error([glib-networking],
[Test for glib-networking failed. This is required.])
elif test "x$have_glib_networking" != "xyes"; then
warning_glib_networking="
WARNING: Test for glib-networking cannot be performed while cross-compiling.
Make sure glib-networking is installed, otherwise GIMP will not be able
to display the remote help pages through the help browser, nor will it
be able to open remote HTTPS (or other protocol using SSL/TLS) files.
HTTPS is becoming the expected standard and should not be considered
optional anymore."
fi
AC_PATH_PROG(GLIB_COMPILE_RESOURCES, glib-compile-resources, no)
if test "x$GLIB_COMPILE_RESOURCES" = xno; then
add_deps_error([glib-compile-resources],
......@@ -2629,7 +2656,7 @@ Optional Modules:
Tests:
Use xvfb-run $have_xvfb_run
$have_recommended_xgettext $have_recommended_fontconfig $have_recommended_gtk$warning_vector_icons_windows"
$have_recommended_xgettext$have_recommended_fontconfig$have_recommended_gtk$warning_vector_icons_windows$warning_glib_networking"
if test "x$required_deps" = "x"; then
AC_OUTPUT
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment