diff --git a/configure.ac b/configure.ac index c446ce77..97dad05b 100644 --- a/configure.ac +++ b/configure.ac @@ -1001,12 +1001,16 @@ AH_BOTTOM([ ]) -# Substitution used for gpgme-config and gpgme.pc +# Substitution used for gpgme-config and gpgme.pc and gpgmepp.pc GPGME_CONFIG_LIBS="-lgpgme" GPGME_CONFIG_CFLAGS="" GPGME_CONFIG_HOST="$host" GPGME_CONFIG_AVAIL_LANG="$enabled_languages" +GPGMEPP_PKGCONFIG_LIBS="-lgpgmepp" +GPGMEPP_PKGCONFIG_CFLAGS="" +GPGMEPP_PKGCONFIG_HOST="$host" + case "$includedir" in /usr/include|/include) ;; '${prefix}/include') @@ -1016,6 +1020,11 @@ case "$includedir" in else GPGME_CONFIG_CFLAGS="-I\${includedir} $GPGME_CONFIG_CFLAGS" fi + if test -z "$GPGMEPP_PKGCONFIG_CFLAGS"; then + GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir}" + else + GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir} $GPGMEPP_PKGCONFIG_CFLAGS" + fi fi ;; *) @@ -1024,6 +1033,11 @@ case "$includedir" in else GPGME_CONFIG_CFLAGS="-I\${includedir} $GPGME_CONFIG_CFLAGS" fi + if test -z "$GPGMEPP_PKGCONFIG_CFLAGS"; then + GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir}" + else + GPGMEPP_PKGCONFIG_CFLAGS="-I\${includedir} $GPGMEPP_PKGCONFIG_CFLAGS" + fi ;; esac case "$libdir" in @@ -1032,12 +1046,17 @@ case "$libdir" in if test "$exec_prefix" = "NONE"; then if test "$prefix" != / -a "$prefix" != /usr; then GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS" + GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS" fi elif test "$exec_prefix" != / -a "$exec_prefix" != /usr; then GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS" + GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS" fi ;; - *) GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS" ;; + *) + GPGME_CONFIG_LIBS="-L\${libdir} $GPGME_CONFIG_LIBS" + GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS" + ;; esac AC_SUBST(GPGME_CONFIG_API_VERSION) @@ -1045,6 +1064,9 @@ AC_SUBST(GPGME_CONFIG_LIBS) AC_SUBST(GPGME_CONFIG_CFLAGS) AC_SUBST(GPGME_CONFIG_HOST) AC_SUBST(GPGME_CONFIG_AVAIL_LANG) +AC_SUBST(GPGMEPP_PKGCONFIG_LIBS) +AC_SUBST(GPGMEPP_PKGCONFIG_CFLAGS) +AC_SUBST(GPGMEPP_PKGCONFIG_HOST) # Frob'da Variables LTLIBOBJS=`echo "$LIB@&t@OBJS" | @@ -1113,6 +1135,7 @@ AC_CONFIG_FILES(Makefile src/Makefile AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) AC_CONFIG_FILES(lang/cpp/tests/Makefile) +AC_CONFIG_FILES(lang/cpp/src/gpgmepp.pc) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfigVersion.cmake) diff --git a/lang/cpp/src/Makefile.am b/lang/cpp/src/Makefile.am index a2edb49e..e6d23889 100644 --- a/lang/cpp/src/Makefile.am +++ b/lang/cpp/src/Makefile.am @@ -19,8 +19,12 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = gpgmepp.pc + EXTRA_DIST = GpgmeppConfig.cmake.in.in GpgmeppConfigVersion.cmake.in \ - gpgmepp_version.h.in GpgmeppConfig-w32.cmake.in.in + gpgmepp_version.h.in GpgmeppConfig-w32.cmake.in.in \ + gpgmepp.pc.in lib_LTLIBRARIES = libgpgmepp.la diff --git a/lang/cpp/src/gpgmepp.pc.in b/lang/cpp/src/gpgmepp.pc.in new file mode 100644 index 00000000..37c15357 --- /dev/null +++ b/lang/cpp/src/gpgmepp.pc.in @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ +libdir=@libdir@ +host=@GPGMEPP_PKGCONFIG_HOST@ + +Name: gpgmepp +Description: GnuPG Made Easy (C++ binding) +Requires.private: gpg-error, gpgme +Version: @PACKAGE_VERSION@ +Cflags: @GPGMEPP_PKGCONFIG_CFLAGS@ +Libs: @GPGMEPP_PKGCONFIG_LIBS@ +URL: https://www.gnupg.org/software/gpgme/index.html