build,qt: Explicitly namespace a few Qt variables for Qt5
m4/qt.m4: Rename to m4/qt5.m4: this. (FIND_QT): Rename to FIND_QT5. (GPGME_QT): Change variable prefix to GPGME_QT5. (GPGME_QTTEST: Change variable prefix to GPGME_QT5TEST. configure.ac, lang/qt/src/Makefile.am, lang/qt/tests/Makefile.am: Adjust accordingly. -- In preparation to adding support for building qgpgme for Qt6, add the version number to a few variables to avoid confusion.
This commit is contained in:
parent
b1e5f3b183
commit
8e908029ff
@ -375,7 +375,7 @@ if test "$found" = "1"; then
|
||||
*** Qt language binding depends on cpp binding.
|
||||
***]])
|
||||
fi
|
||||
FIND_QT
|
||||
FIND_QT5
|
||||
if test "$have_qt5_libs" != "yes"; then
|
||||
if test "$explicit_languages" = "1"; then
|
||||
AC_MSG_ERROR([[
|
||||
@ -408,7 +408,7 @@ LIST_MEMBER("qt", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AX_GCC_FUNC_ATTRIBUTE(visibility)
|
||||
if test "$ax_cv_have_func_attribute_visibility" = "yes"; then
|
||||
GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fvisibility=hidden"
|
||||
GPGME_QT5_CFLAGS="$GPGME_QT5_CFLAGS -fvisibility=hidden"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -261,12 +261,12 @@ nodist_qgpgmeinclude_HEADERS = qgpgme_version.h
|
||||
libqgpgme_la_SOURCES = $(qgpgme_sources) $(qgpgme_headers) $(private_qgpgme_headers)
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
|
||||
@GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
|
||||
@GPGME_QT5_CFLAGS@ @GPG_ERROR_CFLAGS@ @LIBASSUAN_CFLAGS@ \
|
||||
-DBUILDING_QGPGME -Wsuggest-override \
|
||||
-Wzero-as-null-pointer-constant
|
||||
|
||||
libqgpgme_la_LIBADD = ../../cpp/src/libgpgmepp.la ../../../src/libgpgme.la \
|
||||
@LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ @GPGME_QT_LIBS@
|
||||
@LIBASSUAN_LIBS@ @GPG_ERROR_LIBS@ @GPGME_QT5_LIBS@
|
||||
libqgpgme_la_LDFLAGS = -no-undefined -version-info \
|
||||
@LIBQGPGME_LT_CURRENT@:@LIBQGPGME_LT_REVISION@:@LIBQGPGME_LT_AGE@
|
||||
|
||||
|
@ -45,12 +45,12 @@ moc_files = \
|
||||
AM_LDFLAGS = -no-install
|
||||
|
||||
LDADD = ../../cpp/src/libgpgmepp.la ../src/libqgpgme.la \
|
||||
../../../src/libgpgme.la @GPGME_QT_LIBS@ @GPG_ERROR_LIBS@ \
|
||||
@GPGME_QTTEST_LIBS@ @LDADD_FOR_TESTS_KLUDGE@ -lstdc++
|
||||
../../../src/libgpgme.la @GPGME_QT5_LIBS@ @GPG_ERROR_LIBS@ \
|
||||
@GPGME_QT5TEST_LIBS@ @LDADD_FOR_TESTS_KLUDGE@ -lstdc++
|
||||
|
||||
AM_CPPFLAGS = -I$(top_srcdir)/lang/cpp/src -I$(top_builddir)/src \
|
||||
@GPG_ERROR_CFLAGS@ @GPGME_QT_CFLAGS@ @GPG_ERROR_CFLAGS@ \
|
||||
@LIBASSUAN_CFLAGS@ @GPGME_QTTEST_CFLAGS@ -DBUILDING_QGPGME \
|
||||
@GPG_ERROR_CFLAGS@ @GPGME_QT5_CFLAGS@ @GPG_ERROR_CFLAGS@ \
|
||||
@LIBASSUAN_CFLAGS@ @GPGME_QT5TEST_CFLAGS@ -DBUILDING_QGPGME \
|
||||
-I$(top_srcdir)/lang/qt/src \
|
||||
-DTOP_SRCDIR="$(top_srcdir)"
|
||||
|
||||
|
@ -1,31 +1,31 @@
|
||||
dnl qt.m4
|
||||
dnl qt5.m4
|
||||
dnl Copyright (C) 2016 Intevation GmbH
|
||||
dnl
|
||||
dnl This file is part of gpgme and is provided under the same license as gpgme
|
||||
|
||||
dnl Autoconf macro to find either Qt4 or Qt5
|
||||
dnl Autoconf macro to find Qt5
|
||||
dnl
|
||||
dnl sets GPGME_QT_LIBS and GPGME_QT_CFLAGS
|
||||
dnl sets GPGME_QT5_LIBS and GPGME_QT5_CFLAGS
|
||||
dnl
|
||||
dnl if QT5 was found have_qt5_libs is set to yes
|
||||
|
||||
AC_DEFUN([FIND_QT],
|
||||
AC_DEFUN([FIND_QT5],
|
||||
[
|
||||
have_qt5_libs="no";
|
||||
|
||||
PKG_CHECK_MODULES(GPGME_QT,
|
||||
PKG_CHECK_MODULES(GPGME_QT5,
|
||||
Qt5Core >= 5.0.0,
|
||||
[have_qt5_libs="yes"],
|
||||
[have_qt5_libs="no"])
|
||||
|
||||
PKG_CHECK_MODULES(GPGME_QTTEST,
|
||||
PKG_CHECK_MODULES(GPGME_QT5TEST,
|
||||
Qt5Test >= 5.0.0,
|
||||
[have_qt5test_libs="yes"],
|
||||
[have_qt5test_libs="no"])
|
||||
|
||||
if ! test "$have_w32_system" = yes; then
|
||||
if "$PKG_CONFIG" --variable qt_config Qt5Core | grep -q "reduce_relocations"; then
|
||||
GPGME_QT_CFLAGS="$GPGME_QT_CFLAGS -fpic"
|
||||
GPGME_QT5_CFLAGS="$GPGME_QT5_CFLAGS -fpic"
|
||||
fi
|
||||
fi
|
||||
if test "$have_qt5_libs" = "yes"; then
|
||||
@ -61,9 +61,9 @@ AC_DEFUN([FIND_QT],
|
||||
dnl we check here that we can actually compile / link a qt application
|
||||
dnl for host.
|
||||
OLDCPPFLAGS=$CPPFLAGS
|
||||
CPPFLAGS=$GPGME_QT_CFLAGS
|
||||
CPPFLAGS=$GPGME_QT5_CFLAGS
|
||||
OLDLIBS=$LIBS
|
||||
LIBS=$GPGME_QT_LIBS
|
||||
LIBS=$GPGME_QT5_LIBS
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_MSG_CHECKING([whether a simple qt program can be built])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([
|
Loading…
Reference in New Issue
Block a user