e31359fdaa063b0e8ef98866b2c5df88df38c540
[ira/wip.git] / source / libcli / config.m4
1 AC_MSG_CHECKING([for Python (libcli_nbt)])
2
3 PYTHON=
4  
5 AC_ARG_WITH(python,
6 [  --with-python=PYTHONNAME  build Python libraries],
7 [ case "${withval-python}" in
8   yes)
9         PYTHON=python
10         ;;
11   no)
12         PYTHON=
13         ;;
14   *)
15         PYTHON=${withval-python}
16         ;;
17   esac ])
18
19 if test x"$PYTHON" != "x"; then
20         incdir=`python -c 'import sys; print "%s/include/python%d.%d" % (sys.prefix, sys.version_info[[0]], sys.version_info[[1]])'`
21         CPPFLAGS="$CPPFLAGS -I $incdir"
22 fi
23
24 if test x"$PYTHON" != "x"; then
25         AC_MSG_RESULT([${withval-python}])
26 else
27         AC_MSG_RESULT(no)
28         SMB_ENABLE(swig_libcli_nbt, NO)
29 fi
30
31 AC_SUBST(PYTHON)