From 50ff08b03c7cec8e10b35ba438633b9fe08a8d90 Mon Sep 17 00:00:00 2001 From: Xiangyue Cai Date: Thu, 18 Jun 2020 11:23:11 +0800 Subject: [PATCH] add --with-python3 option (#55) * add --with-python3 option * debian package with python3 --- configure.ac | 9 ++++++--- debian/rules | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index c293b69..c8c476b 100644 --- a/configure.ac +++ b/configure.ac @@ -83,6 +83,9 @@ fi AM_CONDITIONAL([FBSD], [test "$bfbsd" = "yes"]) AC_SUBST(FBSD) +AC_ARG_WITH([python3], [AS_HELP_STRING([--with-python3], [use python3])], + [with_python3="yes"],[]) + # Checks for libraries. GLIB_REQUIRED=2.26.0 @@ -98,10 +101,10 @@ PKG_CHECK_MODULES(JANSSON, [jansson >= $JANSSON_REQUIRED]) AC_SUBST(JANSSON_CFLAGS) AC_SUBST(JANSSON_LIBS) -if test "$bwin32" = "true" -o "$bmac" = "yes"; then - AM_PATH_PYTHON([2.7]) -else +if test "$with_python3" = "yes"; then AM_PATH_PYTHON([3.5]) +else + AM_PATH_PYTHON([2.7]) fi if test "$bwin32" = true; then diff --git a/debian/rules b/debian/rules index d722d66..6a71479 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ override_dh_auto_configure: ./autogen.sh - dh_auto_configure -- --disable-compile-demo + dh_auto_configure -- --disable-compile-demo --with-python3 override_dh_strip: # emptying the dependency_libs field in .la files