How to disable python in libnl?

Ben Greear greearb at
Tue Nov 15 17:48:46 EST 2011

On 11/15/2011 02:30 PM, Yegor Yefremov wrote:
> On Tue, Nov 15, 2011 at 7:50 PM, Ben Greear<greearb at>  wrote:
>> I'm trying to cross-compile libnl for ARM and I don't
>> think I have any need of the python stuff.
>> Is there any way to disable libnl's use of python?  I
>> didn't see any obvious way to do it in ./configure --help
> AFAIK it should be possible since this commit:

You need something like this to make it work.  Still testing on other
machines, and will post it proper.  Without explicitly disabling python,
it will find the host python and mess up cross-compiles:

[greearb at ben-dt libnl]$ git diff HEAD~1
diff --git a/ b/
index e91b51f..3dff5b4 100644
--- a/
+++ b/
@@ -67,6 +67,11 @@ AC_ARG_ENABLE([cli],
         [enable_cli="$enableval"], [enable_cli="yes"])
  AM_CONDITIONAL([ENABLE_CLI], [test "$enable_cli" = "yes"])

+       AS_HELP_STRING([--disable-python], [Do not build python related code]),
+       [enable_python="$enableval"], [enable_python="yes"])
+AM_CONDITIONAL([ENABLE_PYTHON], [test "$enable_python" = "yes"])
  AC_CHECK_LIB([m], [pow], [], AC_MSG_ERROR([libm is required]))
  AC_CHECK_LIB([pthread], [pthread_mutex_lock], [], AC_MSG_ERROR([libpthread is required]))

> Yegor

Ben Greear <greearb at>
Candela Technologies Inc

More information about the libnl mailing list