diff options
author | Justus Winter <[email protected]> | 2016-05-11 09:42:00 +0000 |
---|---|---|
committer | Justus Winter <[email protected]> | 2016-05-11 11:33:05 +0000 |
commit | a29babd07cf9f9625d2b5aa2eb6b7bc9d1828359 (patch) | |
tree | 5d59f8ab48f2d2f3db1ef70dcb9ca760444635cc /configure.ac | |
parent | python: PEP8 fixes. (diff) | |
download | gpgme-a29babd07cf9f9625d2b5aa2eb6b7bc9d1828359.tar.gz gpgme-a29babd07cf9f9625d2b5aa2eb6b7bc9d1828359.zip |
python: Integrate into the build system.
* configure.ac: Make Python bindings configurable, add new Makefile.
* lang/python/Makefile.am: New file.
* lang/python/setup.py: Integrate into the build system.
* m4/ax_pkg_swig.m4: New file from the autoconf archive.
* m4/m4_ax_swig_python.m4: Likewise.
Signed-off-by: Justus Winter <[email protected]>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 55c388eb..96df0598 100644 --- a/configure.ac +++ b/configure.ac @@ -587,6 +587,32 @@ AC_SUBST(emacs_local_vars_begin, [['Local][ ][Variables:']]) AC_SUBST(emacs_local_vars_read_only, ['buffer-read-only: t']) AC_SUBST(emacs_local_vars_end, ['End:']) +# Bindings. +AC_ARG_ENABLE([python], + AC_HELP_STRING([--enable-python], + [build the Python3 bindings]), + [enable_python=$enableval], + [enable_python=auto]) +AX_PKG_SWIG +if test -z "$SWIG"; then + if test $enable_python = yes; then + die=yes + AC_MSG_NOTICE([[ +*** +*** You need SWIG to build the Python bindings. +***]]) + else + enable_python=no + fi +else + if test $enable_python = auto; then + enable_python=yes + fi +fi +if test $enable_python = yes; then + AM_PATH_PYTHON([3.2]) + AX_SWIG_PYTHON +fi # Last check. die=no @@ -632,7 +658,8 @@ AC_CONFIG_FILES(Makefile src/Makefile src/versioninfo.rc src/gpgme.h) AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) -AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd]) +AC_CONFIG_FILES([lang/Makefile lang/cl/Makefile lang/cl/gpgme.asd + lang/python/Makefile]) AC_OUTPUT echo " @@ -644,6 +671,8 @@ echo " UI Server: $uiserver FD Passing: $use_descriptor_passing GPGME Pthread: $have_pthread + + Python bindings: $enable_python " if test "x${gpg_config_script_warn}" != x; then cat <<G10EOF |