1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-02 20:59:09 +03:00

r26422: build: let configure print out if we have working python module support

metze
(This used to be commit dfb9d704d0)
This commit is contained in:
Stefan Metzmacher
2007-12-13 08:36:03 +01:00
parent 026d67675c
commit 8530e8429a

View File

@ -120,6 +120,7 @@ AC_SUBST(PYTHON_EXTRA_LDFLAGS)
SMB_EXT_LIB(LIBPYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CPPFLAGS])
AC_MSG_CHECKING(working python module support)
if test x$working_python = xyes
then
ac_save_LIBS="$LIBS"
@ -128,14 +129,21 @@ then
CFLAGS="$CFLAGS $PYTHON_CPPFLAGS"
AC_TRY_LINK([
#include <Python.h>
#include <stdlib.h>],
[Py_InitModule(NULL, NULL);],
[SMB_ENABLE(LIBPYTHON,YES)],
[SMB_ENABLE(LIBPYTHON,NO)])
#include <Python.h>
#include <stdlib.h>
],[
Py_InitModule(NULL, NULL);
],[
SMB_ENABLE(LIBPYTHON,YES)
AC_MSG_RESULT([yes])
],[
SMB_ENABLE(LIBPYTHON,NO)
AC_MSG_RESULT([no])
])
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
else
SMB_ENABLE(LIBPYTHON,NO)
AC_MSG_RESULT([no])
fi