diff options
| -rwxr-xr-x | autogen-all.sh | 2 | ||||
| -rw-r--r-- | configure.ac | 10 | ||||
| -rw-r--r-- | lang/qt/configure.ac | 41 | 
3 files changed, 44 insertions, 9 deletions
diff --git a/autogen-all.sh b/autogen-all.sh index a57863fe..88fb15f7 100755 --- a/autogen-all.sh +++ b/autogen-all.sh @@ -15,7 +15,7 @@  prog=$(basename "$0") -packages=". lang/cpp" +packages=". lang/cpp lang/qt"  fatal () {      echo "${prog}:" "$*" >&2 diff --git a/configure.ac b/configure.ac index bb21e754..7ec79226 100644 --- a/configure.ac +++ b/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 diff --git a/lang/qt/configure.ac b/lang/qt/configure.ac index b99a74e8..e4f3666e 100644 --- a/lang/qt/configure.ac +++ b/lang/qt/configure.ac @@ -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 -AM_PATH_GPGME("$NEED_GPGME_VERSION", -              have_gpgme=yes, have_gpgme=no) - -# And for gpgmepp.  have_gpgmepp=no -AM_PATH_GPGMEPP("$NEED_GPGMEPP_VERSION", -                have_gpgmepp=yes, 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) +fi +if test "$have_gpgmepp" = "no"; then +  AM_PATH_GPGMEPP("$NEED_GPGMEPP_VERSION", +                  have_gpgmepp=yes, have_gpgmepp=no) +fi  # Last check.  die=no  | 
