From ae332749eee056f59bf902a65ffb012fcf181875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Mon, 30 Oct 2023 09:28:54 +0100 Subject: build,qt: Build Qt with -fPIC if required or requested * configure.ac: Add option to enable building the Qt 6 binding with -fPIC. Fix typo and mention default for --enable-no-direct-extern-access option. * m4/qt6.m4: Add -fPIC to GPGME_QT6_CFLAGS if requested or if Qt 6 was built with reduce_relocations. -- GnuPG-bug-id: 6781 --- configure.ac | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index f36c0841..2d571e21 100644 --- a/configure.ac +++ b/configure.ac @@ -338,6 +338,18 @@ if test x$fixed_search_path != x ; then [Locate binaries only via this PATH]) fi +# Option --enable-reduce-relocations +# +# Allow building the Qt 6 bindings explicitly with -fPIC if the automatic +# detection fails. Note: We assume that this flag is always available (unless +# we built for Windows). +AC_ARG_ENABLE([reduce-relocations], + AS_HELP_STRING([--enable-reduce-relocations], + [build Qt 6 bindings with -fPIC (default is + auto)]), + [use_reduce_relocations="$enableval"], + [use_reduce_relocations=""]) + # Option --enable-no-direct-extern-access # # Some distributions build Qt 6 with -mno-direct-extern-access. Libraries and @@ -352,8 +364,8 @@ AX_CHECK_COMPILE_FLAG([-mno-direct-extern-access], AC_LANG_POP() AC_ARG_ENABLE([no-direct-extern-access], AS_HELP_STRING([--enable-no-direct-extern-access], - [build Qt 6 bindinds with - -mno-direct-extern-access]), + [build Qt 6 bindings with + -mno-direct-extern-access (default is auto)]), [use_no_direct_extern_access="$enableval"], [use_no_direct_extern_access=""]) -- cgit v1.2.3