aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorIngo Klöcker <[email protected]>2024-05-27 17:01:03 +0200
committerIngo Klöcker <[email protected]>2024-06-11 14:23:40 +0200
commit28c23ce8db2a79ecba55236ab3f49e2ebdc03c9a (patch)
tree61b1744eec7a984f923c72c1700bdf96b3fee9b5 /configure.ac
parentcpp: Don't include config.h (diff)
downloadgpgme-28c23ce8db2a79ecba55236ab3f49e2ebdc03c9a.tar.gz
gpgme-28c23ce8db2a79ecba55236ab3f49e2ebdc03c9a.zip
build,cpp: Separate C++ bindings from gpgme
* configure.ac: Remove definition and substitution of LIBGPGMEPP_LT_CURRENT, LIBGPGMEPP_LT_AGE, LIBGPGMEPP_LT_REVISION. Remove "cpp" from available_languages and from default_languages. Remove checks for C++ 11 and for support of visibility attribute. Remove substitution of GPGME_CPP_CFLAGS. Remove definition and substitution of GPGMEPP_PKGCONFIG_LIBS, GPGMEPP_PKGCONFIG_CFLAGS, GPGMEPP_PKGCONFIG_HOST. Remove generation of files in lang/cpp. * lang/Makefile.am (DIST_SUBDIRS): Remove cpp. * lang/cpp/.gitignore, lang/cpp/AUTHORS, lang/cpp/COPYING, lang/cpp/COPYING.LESSER, lang/cpp/COPYING.LIB, lang/cpp/ChangeLog, lang/cpp/INSTALL, lang/cpp/NEWS, lang/cpp/autogen.rc, lang/cpp/autogen.sh, lang/cpp/configure.ac: New. * lang/cpp/Makefile.am (EXTRA_DIST): Add autogen.sh, autogen.rc, VERSION. (RELEASE_ARCHIVE_SUFFIX, ACLOCAL_AMFLAGS, dist-hook, distcheck-hook, .PHONY, gen_start_date, gen-ChangeLog, RELEASE_NAME, release, sign-release): New (copied from top-level Makefile.am). * lang/cpp/build-aux/compile, lang/cpp/build-aux/config.guess, lang/cpp/build-aux/config.sub, lang/cpp/build-aux/depcomp, lang/cpp/build-aux/install-sh, lang/cpp/build-aux/libtool-patch.sed, lang/cpp/build-aux/ltmain.sh, lang/cpp/build-aux/missing: New. * m4/ax_cxx_compile_stdcxx.m4: Move to... * lang/cpp/m4/ax_cxx_compile_stdcxx.m4: ...here. * m4/ax_gcc_func_attribute.m4: Move to... * lang/cpp/m4/ax_gcc_func_attribute.m4: ...here. * lang/cpp/m4/gpg-error.m4, lang/cpp/m4/gpgme.m4, lang/cpp/m4/libtool.m4, lang/cpp/m4/ltoptions.m4, lang/cpp/m4/ltsugar.m4, lang/cpp/m4/ltversion.m4, lang/cpp/m4/lt~obsolete.m4: New. * lang/cpp/src/GpgmeppConfig-w32.cmake.in.in, lang/cpp/src/GpgmeppConfig.cmake.in.in: Remove @LIBASSUAN_LIBS@ from INTERFACE_LINK_LIBRARIES of Gpgmepp target. * lang/cpp/src/Makefile.am (AM_CPPFLAGS): Replace include paths of gpgme relative to top_builddir with @GPGME_CFLAGS@. Remove @LIBASSUAN_CFLAGS@. (libgpgmepp_la_LIBADD): Replace relative paths of libgpgme.la with @GPGME_LIBS@. Remove @LIBASSUAN_LIBS@. * lang/cpp/tests/Makefile.am (LDADD): Replace relative paths of libgpgme.la with @GPGME_LIBS@. (AM_CPPFLAGS): Replace include paths of gpgme relative to top_builddir with @GPGME_CFLAGS@. Remove @LIBASSUAN_CFLAGS@. Remove -DTOP_SRCDIR. -- This makes building and distributing GpgME++ independent of the sources of gpgme. Many of the new files are copied from gpgme to make GpgME++ a self-contained package. A later commit re-adds the possibility to build GpgME++ as nested package together with gpgme. GnuPG-bug-id: 7110
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac79
1 files changed, 5 insertions, 74 deletions
diff --git a/configure.ac b/configure.ac
index 783304a5..57ddcb0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,23 +56,12 @@ AC_INIT([mym4_package],[mym4_version],[https://bugs.gnupg.org])
LIBGPGME_LT_CURRENT=43
LIBGPGME_LT_AGE=32
LIBGPGME_LT_REVISION=1
-
-# If there is an ABI break in gpgmepp also bump the version in
-# IMPORTED_LOCATION in the GpgmeppConfig-w32.cmake.in.in
-
-LIBGPGMEPP_LT_CURRENT=26
-LIBGPGMEPP_LT_AGE=20
-LIBGPGMEPP_LT_REVISION=1
################################################
AC_SUBST(LIBGPGME_LT_CURRENT)
AC_SUBST(LIBGPGME_LT_AGE)
AC_SUBST(LIBGPGME_LT_REVISION)
-AC_SUBST(LIBGPGMEPP_LT_CURRENT)
-AC_SUBST(LIBGPGMEPP_LT_AGE)
-AC_SUBST(LIBGPGMEPP_LT_REVISION)
-
# If the API is changed in an incompatible way: increment the next counter.
GPGME_CONFIG_API_VERSION=1
##############################################
@@ -247,8 +236,8 @@ have_w32_system=no
have_w64_system=no
have_macos_system=no
build_w32_glib=no
-available_languages="cl cpp python"
-default_languages="cl cpp python"
+available_languages="cl python"
+default_languages="cl python"
case "${host}" in
x86_64-*mingw32*)
have_w64_system=yes
@@ -335,10 +324,9 @@ fi
AC_ARG_ENABLE([languages],
AS_HELP_STRING([--enable-languages=languages],
[enable only specific language bindings:
- cl cpp python]),
+ cl python]),
[enabled_languages=`echo $enableval | \
- tr ',:' ' ' | tr '[A-Z]' '[a-z]' | \
- sed 's/c++/cpp/'`],
+ tr ',:' ' ' | tr '[A-Z]' '[a-z]'`],
[enabled_languages="maybe"])
if test "x$enabled_languages" = "x" \
-o "$enabled_languages" = "no"; then
@@ -361,36 +349,6 @@ for language in $enabled_languages; do
fi
done
-# Enable C++ 11 if cpp is requested (unless C++ 17 was already enabled)
-LIST_MEMBER("cpp", $enabled_languages)
-if test "$found" = "1" -a "$HAVE_CXX17" != "1"; then
- AX_CXX_COMPILE_STDCXX(11, noext, optional)
- if test "$HAVE_CXX11" != "1"; then
- if test "$explicit_languages" = "1"; then
- AC_MSG_ERROR([[
-***
-*** A compiler with c++11 support is required for the C++ binding.
-***]])
- else
- enabled_languages=$(echo $enabled_languages | sed 's/cpp//')
- AC_MSG_WARN([[
-***
-*** No c++11 support detected. C++ bindings will be disabled.
-***]])
- fi
- fi
-fi
-
-# Check whether compiler supports visibility attribute (if cpp language is enabled)
-LIST_MEMBER("cpp", $enabled_languages)
-if test "$found" = "1"; then
- AX_GCC_FUNC_ATTRIBUTE(visibility)
- if test "$ax_cv_have_func_attribute_visibility" = "yes"; then
- GPGME_CPP_CFLAGS="$GPGME_CPP_CFLAGS -fvisibility=hidden"
- fi
-fi
-AC_SUBST(GPGME_CPP_CFLAGS)
-
# Python bindings.
LIST_MEMBER("python", $enabled_languages)
found_py=$found
@@ -824,16 +782,12 @@ AH_BOTTOM([
])
-# Substitution used for gpgme-config and gpgme.pc and gpgmepp.pc
+# Substitution used for gpgme-config and gpgme.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')
@@ -843,11 +797,6 @@ 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
;;
*)
@@ -856,11 +805,6 @@ 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
@@ -869,16 +813,13 @@ 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"
- GPGMEPP_PKGCONFIG_LIBS="-L\${libdir} $GPGMEPP_PKGCONFIG_LIBS"
;;
esac
@@ -887,9 +828,6 @@ 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" |
@@ -956,13 +894,6 @@ AC_CONFIG_FILES(Makefile src/Makefile
src/gpgme-glib.pc
src/gpgme.h)
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)
-AC_CONFIG_FILES(lang/cpp/src/gpgmepp_version.h)
AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd])
AC_CONFIG_FILES([lang/js/Makefile lang/js/src/Makefile
lang/js/BrowserTestExtension/Makefile