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

r26411: Double check Python installation - make sure we can compile and link using it.

(This used to be commit 3d8fc5808c)
This commit is contained in:
Jelmer Vernooij
2007-12-12 03:02:18 +01:00
committed by Stefan Metzmacher
parent b8850f326b
commit 6d2edec0a2

View File

@ -119,9 +119,23 @@ AC_SUBST(PYTHON_EXTRA_LDFLAGS)
SMB_EXT_LIB(LIBPYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CPPFLAGS])
if test x$working_python = xyes
then
SMB_ENABLE(LIBPYTHON,YES)
ac_save_LIBS="$LIBS"
ac_save_CFLAGS="$CFLAGS"
LIBS="$LIBS $PYTHON_LDFLAGS"
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)])
LIBS="$ac_save_LIBS"
CFLAGS="$ac_save_CFLAGS"
else
SMB_ENABLE(LIBPYTHON,NO)
fi