Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-python
authorJelmer Vernooij <jelmer@samba.org>
Tue, 22 Jan 2008 15:39:56 +0000 (16:39 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 22 Jan 2008 15:39:56 +0000 (16:39 +0100)
1  2 
source/scripting/python/config.m4
source/selftest/target/Samba4.pm

index 348f9197f719c3eb69d16ea44ac8aaf36c0770e1,4f46f92682ee3f5183215864f104489d7b261862..908efd1588e880a77860328b33a28ee6df749cb2
@@@ -38,32 -62,15 +62,12 @@@ f
  SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
  
  AC_MSG_CHECKING(working python module support)
- if test x$working_python = xyes
- then
-       ac_save_LIBS="$LIBS"
-       ac_save_CFLAGS="$CFLAGS"
-       LIBS="$LIBS $PYTHON_LDFLAGS"
-       CFLAGS="$CFLAGS $PYTHON_CFLAGS"
-       AC_TRY_LINK([
-                       #include <Python.h>
-                       #include <stdlib.h>
-               ],[
-                       Py_InitModule(NULL, NULL);
-               ],[
-                       SMB_ENABLE(EXT_LIB_PYTHON,YES)
-                       SMB_ENABLE(smbpython,YES)
-                       SMB_ENABLE(LIBPYTHON,YES)
-                       AC_MSG_RESULT([yes])
-               ],[
-                       SMB_ENABLE(EXT_LIB_PYTHON,NO)
-                       SMB_ENABLE(LIBPYTHON,NO)
-                       SMB_ENABLE(smbpython,NO)
-                       AC_MSG_RESULT([no])
-               ])
-       LIBS="$ac_save_LIBS"
-       CFLAGS="$ac_save_CFLAGS"
+ if test $working_python = yes; then
+       SMB_ENABLE(EXT_LIB_PYTHON,YES)
+       SMB_ENABLE(smbpython,YES)
+       SMB_ENABLE(LIBPYTHON,YES)
+       AC_MSG_RESULT([yes])
  else
 -      SMB_ENABLE(EXT_LIB_PYTHON,NO)
 -      SMB_ENABLE(LIBPYTHONyy,NO)
 -      SMB_ENABLE(smbpython,NO)
 -      AC_MSG_RESULT([no])
 +      AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
  fi
Simple merge