Summary Files Commits Branches @commit @diff @stats
path: root / configure
diff options
context:
space:
mode:
1 files changed, 38 insertions, 1 deletions
-rwxr-xr-xconfigure39
diff --git a/configure b/configure
index 3776bfa..7f52579 100755
--- a/configure
+++ b/configure
@@ -69,7 +69,7 @@ case "${WITH_WEBKITGTK}n" in
DEPS="${DEPS} webkit2gtk-4.0"
;;
n)
- echo "warning: Packagers should specify the ABI version (4.0 or 4.1) in WITH_WEBKITGTK" >&2
+ echo "notice: Packagers should consider setting the ABI version (4.0 or 4.1) in WITH_WEBKITGTK" >&2
if pkg_config_check --atleast-version=2.32.0 webkit2gtk-4.1
then
DEPS="${DEPS} webkit2gtk-4.1"
@@ -84,6 +84,43 @@ case "${WITH_WEBKITGTK}n" in
;;
esac
+case "${WITH_URI_PARSER}n" in
+ gurin)
+ echo "URI parser selected: GUri from glib-2.0"
+ pkg_config_check --atleast-version=2.66.0 glib-2.0 || exit 1
+ DEPS="${DEPS} glib-2.0"
+ ;;
+ libsoup2n)
+ echo "URI parser selected: libsoup-2.4"
+ pkg_config_check libsoup-2.4 || exit 1
+ DEPS="${DEPS} libsoup-2.4"
+ CFLAGS="${CFLAGS} -DUSE_LIBSOUP2"
+
+ if echo "${DEPS}" | grep -q 'webkit2gtk-4.1'
+ then
+ echo 'warning: libsoup2 selected while WebKitGTK with libsoup3 API is used' >&2
+ fi
+ ;;
+ n)
+ echo "notice: Packagers should consider setting the URI parsing library (guri or libsoup2) in WITH_URI_PARSER" >&2
+
+ if echo "${DEPS}" | grep -q 'webkit2gtk-4.0'
+ then
+ pkg_config_check libsoup-2.4 || exit 1
+ echo "URI parser selected: libsoup-2.4"
+ DEPS="${DEPS} libsoup-2.4"
+ CFLAGS="${CFLAGS} -DUSE_LIBSOUP2"
+ else
+ pkg_config_check --atleast-version="${min_glib_guri}" glib-2.0 || exit 1
+ echo "URI parser selected: GUri from glib-2.0"
+ DEPS="${DEPS} glib-2.0"
+ fi
+ ;;
+ *)
+ echo "error: invalid uri provider in WITH_URI_PARSER environment variable, must be guri or libsoup2" >&2
+ ;;
+esac
+
get_cflags() { "${PKGCONFIG}" --cflags "${DEPS}"; }
DEPS_cflags="$(get_cflags)"
get_libs() { "${PKGCONFIG}" --libs "${DEPS}"; }