summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Klöcker <dev@ingo-kloecker.de>2022-10-13 15:36:32 +0200
committerIngo Klöcker <dev@ingo-kloecker.de>2022-10-13 15:39:29 +0200
commitab51bd52642807a665eaa7287284399a05b131d2 (patch)
treee78bba1090971d67e92b5dc3ecd2507c5c420b5a
parente6a1b241b4e6a0a677ed8f0e4e287a5cc82d7fbb (diff)
downloadgpgme-ikloecker/qt6.tar.gz
build: Always compile the Qt 6 test application with -fpicikloecker/qt6
* m4/qt6.m4: Do not add -fpic to GPGME_QT6_CFLAGS. Add -fpic to CPPFLAGS used for build test of simple Qt 6 application. -- The pkgconfig files of Qt6Core do not contain the qt_config variable, so that we cannot easily check whether Qt6 was compiled with pic. For simplicity we always compile the test application with -fpic to avoid a build failure if Qt6 was actually compiled with pic. For the actual build of QGpgME libtool automatically uses -fPIC, so that we don't have to add it to the GPGME_QT6_CFLAGS.
-rw-r--r--m4/qt6.m48
1 files changed, 3 insertions, 5 deletions
diff --git a/m4/qt6.m4 b/m4/qt6.m4
index 6e864fb1..75afb485 100644
--- a/m4/qt6.m4
+++ b/m4/qt6.m4
@@ -23,11 +23,6 @@ AC_DEFUN([FIND_QT6],
[have_qt6test_libs="yes"],
[have_qt6test_libs="no"])
- if ! test "$have_w32_system" = yes; then
- if "$PKG_CONFIG" --variable qt_config Qt6Core | grep -q "reduce_relocations"; then
- GPGME_QT6_CFLAGS="$GPGME_QT6_CFLAGS -fpic"
- fi
- fi
if test "$have_qt6_libs" = "yes"; then
# Qt6 moved moc to libexec
qt6libexecdir=$($PKG_CONFIG --variable=libexecdir 'Qt6Core >= 6.4.0')
@@ -64,6 +59,9 @@ AC_DEFUN([FIND_QT6],
dnl for host.
OLDCPPFLAGS=$CPPFLAGS
CPPFLAGS=$GPGME_QT6_CFLAGS
+ if ! test "$have_w32_system" = yes; then
+ CPPFLAGS="$CPPFLAGS -fpic"
+ fi
OLDLIBS=$LIBS
LIBS=$GPGME_QT6_LIBS
AC_LANG_PUSH(C++)