build,qt: Support building Qt bindings as nested package of gpgme
* autogen-all.sh (packages): Add lang/qt. * configure.ac: Add qt to available languages if subdir exists. Add qt to nested languages if enabled to generate corresponding make targets. Call configure script of nested qt package recursively. * lang/qt/configure.ac: Check if qgpgme is built as nested package and set GPGME_CFLAGS, GPGME_LIBS, GPGMEPP_CFLAGS, and GPGMEPP_LIBS accordingly. -- This re-adds the ability to build the Qt bindings together with gpgme with a single `configure && make` command (if building from git). GnuPG-bug-id: 7110
This commit is contained in:
parent
6334960bbe
commit
0b0a2881ff
@ -15,7 +15,7 @@
|
||||
|
||||
prog=$(basename "$0")
|
||||
|
||||
packages=". lang/cpp"
|
||||
packages=". lang/cpp lang/qt"
|
||||
|
||||
fatal () {
|
||||
echo "${prog}:" "$*" >&2
|
||||
|
10
configure.ac
10
configure.ac
@ -238,7 +238,7 @@ have_macos_system=no
|
||||
build_w32_glib=no
|
||||
available_languages="cl"
|
||||
default_languages="cl"
|
||||
for lang in cpp; do
|
||||
for lang in cpp qt; do
|
||||
if test -d $srcdir/lang/$lang; then
|
||||
available_languages="$available_languages $lang"
|
||||
fi
|
||||
@ -360,6 +360,10 @@ LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
nested_languages="$nested_languages cpp"
|
||||
fi
|
||||
LIST_MEMBER("qt", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
nested_languages="$nested_languages qt"
|
||||
fi
|
||||
|
||||
AC_SUBST(NESTED_LANGUAGES, $nested_languages)
|
||||
|
||||
@ -843,6 +847,10 @@ LIST_MEMBER("cpp", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AC_CONFIG_SUBDIRS([lang/cpp])
|
||||
fi
|
||||
LIST_MEMBER("qt", $enabled_languages)
|
||||
if test "$found" = "1"; then
|
||||
AC_CONFIG_SUBDIRS([lang/qt])
|
||||
fi
|
||||
|
||||
AC_OUTPUT
|
||||
|
||||
|
@ -469,16 +469,43 @@ AC_DEFINE(GPG_ERR_SOURCE_DEFAULT, GPG_ERR_SOURCE_GPGME,
|
||||
AM_CONDITIONAL(USE_GPGRT_CONFIG, [test -n "$GPGRT_CONFIG" \
|
||||
-a "$ac_cv_path_GPG_ERROR_CONFIG" = no])
|
||||
|
||||
# And for gpgme.
|
||||
# Check for gpgme and gpgmepp.
|
||||
have_gpgme=no
|
||||
have_gpgmepp=no
|
||||
# Check if qgpgme is built as nested package of gpgme
|
||||
builddir=`pwd`
|
||||
if test "${srcdir%/lang/qt}/lang/qt" == "$srcdir" -a \
|
||||
"${builddir%/lang/qt}/lang/qt" == "$builddir"; then
|
||||
AC_MSG_CHECKING(for GpgME - assuming nested build)
|
||||
gpgme_build_dir=${builddir%/lang/qt}
|
||||
if test -f "$gpgme_build_dir/src/gpgme.h"; then
|
||||
GPGME_CFLAGS="-I$gpgme_build_dir/src"
|
||||
GPGME_LIBS="$gpgme_build_dir/src/libgpgme.la"
|
||||
have_gpgme=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
AC_MSG_CHECKING(for GpgME++ - assuming nested build)
|
||||
gpgmepp_build_dir=${builddir%/lang/qt}/lang/cpp
|
||||
if test -f "$gpgmepp_build_dir/src/gpgmepp_version.h"; then
|
||||
GPGMEPP_CFLAGS="-I$gpgmepp_build_dir/src"
|
||||
GPGMEPP_LIBS="$gpgmepp_build_dir/src/libgpgmepp.la"
|
||||
have_gpgmepp=yes
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "$have_gpgme" = "no"; then
|
||||
AM_PATH_GPGME("$NEED_GPGME_VERSION",
|
||||
have_gpgme=yes, have_gpgme=no)
|
||||
|
||||
# And for gpgmepp.
|
||||
have_gpgmepp=no
|
||||
fi
|
||||
if test "$have_gpgmepp" = "no"; then
|
||||
AM_PATH_GPGMEPP("$NEED_GPGMEPP_VERSION",
|
||||
have_gpgmepp=yes, have_gpgmepp=no)
|
||||
|
||||
fi
|
||||
|
||||
# Last check.
|
||||
die=no
|
||||
|
Loading…
Reference in New Issue
Block a user