diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-02-10 17:22:03 +0100 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-02-25 08:38:40 +0100 |
commit | 4a5a18f489f4d19aa0571528a7f0c7a8d35ac83f (patch) | |
tree | 3a9381a56ce6a7e2635b354208d202a1dcca9975 /src/conf_macros.m4 | |
parent | 4706958e7505ce279f06cb2bf413eb38ee8f114c (diff) | |
download | sssd-4a5a18f489f4d19aa0571528a7f0c7a8d35ac83f.tar.gz sssd-4a5a18f489f4d19aa0571528a7f0c7a8d35ac83f.tar.xz sssd-4a5a18f489f4d19aa0571528a7f0c7a8d35ac83f.zip |
BUILD: Add possibility to build python{2,3} bindings
Resolves:
https://fedorahosted.org/sssd/ticket/2574
Reviewed-by: Stephen Gallagher <sgallagh@redhat.com>
Diffstat (limited to 'src/conf_macros.m4')
-rw-r--r-- | src/conf_macros.m4 | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index 027490e52..ff49f8442 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -360,21 +360,38 @@ AC_DEFUN([WITH_KRB5_CONF], AC_DEFINE_UNQUOTED([KRB5_CONF_PATH], ["$KRB5_CONF_PATH"], [KRB5 configuration file]) ]) -AC_DEFUN([WITH_PYTHON_BINDINGS], - [ AC_ARG_WITH([python-bindings], - [AC_HELP_STRING([--with-python-bindings], - [Whether to build python bindings [yes]] - ) +AC_DEFUN([WITH_PYTHON2_BINDINGS], + [ AC_ARG_WITH([python2-bindings], + [AC_HELP_STRING([--with-python2-bindings], + [Whether to build python2 bindings [yes]]) + ], + [], + [with_python2_bindings=yes] + ) + if test x"$with_python2_bindings" = xyes; then + AC_SUBST([HAVE_PYTHON2_BINDINGS], [1]) + AC_DEFINE_UNQUOTED([HAVE_PYTHON2_BINDINGS], [1], + [Build with python2 bindings]) + fi + AM_CONDITIONAL([BUILD_PYTHON2_BINDINGS], + [test x"$with_python2_bindings" = xyes]) + ]) + +AC_DEFUN([WITH_PYTHON3_BINDINGS], + [ AC_ARG_WITH([python3-bindings], + [AC_HELP_STRING([--with-python3-bindings], + [Whether to build python3 bindings [yes]]) ], [], - with_python_bindings=yes + [with_python3_bindings=no] ) - if test x"$with_python_bindings" = xyes; then - HAVE_PYTHON_BINDINGS=1 - AC_SUBST(HAVE_PYTHON_BINDINGS) - AC_DEFINE_UNQUOTED(HAVE_PYTHON_BINDINGS, 1, [Build with python bindings]) + if test x"$with_python3_bindings" = xyes; then + AC_SUBST([HAVE_PYTHON3_BINDINGS], [1]) + AC_DEFINE_UNQUOTED([HAVE_PYTHON3_BINDINGS], [1], + [Build with python3 bindings]) fi - AM_CONDITIONAL([BUILD_PYTHON_BINDINGS], [test x"$with_python_bindings" = xyes]) + AM_CONDITIONAL([BUILD_PYTHON3_BINDINGS], + [test x"$with_python3_bindings" = xyes]) ]) AC_DEFUN([WITH_SELINUX], |