X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=configure.ac;h=af13a959e9dc12a1a9c00381195e58f377f41649;hb=acd4df738165e1e4b16e199ee70b77d3e64a260a;hp=46f22a4dacdc9063c78aa5463197038f4faeb37c;hpb=d62bd380797d3a990b2229ea6c16956972f7dfe0;p=platform%2Fupstream%2Fbtrfs-progs.git diff --git a/configure.ac b/configure.ac index 46f22a4..af13a95 100644 --- a/configure.ac +++ b/configure.ac @@ -43,6 +43,8 @@ AC_PATH_PROG([RMDIR], [rmdir], [rmdir]) AC_CHECK_FUNCS([openat], [], [AC_MSG_ERROR([cannot find openat() function])]) +AC_CHECK_FUNCS([reallocarray]) + m4_ifndef([PKG_PROG_PKG_CONFIG], [m4_fatal([Could not locate the pkg-config autoconf macros. These are usually located in /usr/share/aclocal/pkg.m4. @@ -210,6 +212,20 @@ fi AS_IF([test "x$enable_zstd" = xyes], [BTRFSRESTORE_ZSTD=1], [BTRFSRESTORE_ZSTD=0]) AC_SUBST(BTRFSRESTORE_ZSTD) +AC_ARG_ENABLE([python], + AS_HELP_STRING([--disable-python], [do not build libbtrfsutil Python bindings]), + [], [enable_python=yes] +) + +if test "x$enable_python" = xyes; then + AM_PATH_PYTHON([3.4]) + PKG_CHECK_MODULES(PYTHON, [python-${PYTHON_VERSION}]) +fi + +AS_IF([test "x$enable_python" = xyes], [PYTHON_BINDINGS=1], [PYTHON_BINDINGS=0]) +AC_SUBST(PYTHON_BINDINGS) +AC_SUBST(PYTHON) + # udev v190 introduced the btrfs builtin and a udev rule to use it. # Our udev rule gives us the friendly dm names but isn't required (or valid) # on earlier releases. @@ -265,6 +281,8 @@ AC_MSG_RESULT([ backtrace support: ${enable_backtrace} btrfs-convert: ${enable_convert} ${convertfs:+($convertfs)} btrfs-restore zstd: ${enable_zstd} + Python bindings: ${enable_python} + Python interpreter: ${PYTHON} Type 'make' to compile. ])