vlp: Move closer to the code tested.
[kai/samba.git] / source3 / samba4.m4
index c02d3d4b3be9bf5f68268c00a0c0d8e517339dc9..05d655217fddd357e50ab615076c1ab9fcb9974a 100644 (file)
@@ -3,25 +3,51 @@ AC_SUBST(BLDSHARED)
 smbtorture4_path=bin/smbtorture4
 m4_include(build/m4/public.m4)
 
+m4_include(build/m4/check_python.m4)
+
+m4_include(build/m4/ac_pkg_swig.m4)
+
+AC_PROG_SWIG(1.3.36)
+
+AC_SAMBA_PYTHON_DEVEL([
+SMB_EXT_LIB(EXT_LIB_PYTHON, [$PYTHON_LDFLAGS], [$PYTHON_CFLAGS])
+SMB_ENABLE(EXT_LIB_PYTHON,YES)
+SMB_ENABLE(LIBPYTHON,YES)
+],[
+AC_MSG_ERROR([Python not found. Please install Python 2.x and its development headers/libraries.])
+])
+
+AC_MSG_CHECKING(python library directory)
+pythondir=`$PYTHON -c "from distutils import sysconfig; print sysconfig.get_python_lib(1, 0, '\\${prefix}')"`
+AC_MSG_RESULT($pythondir)
+
+AC_SUBST(pythondir)
+
 m4_include(lib/smbreadline/readline.m4)
 m4_include(heimdal_build/internal.m4)
-m4_include(lib/util/fault.m4)
-m4_include(lib/util/signal.m4)
-m4_include(lib/util/util.m4)
-m4_include(lib/util/fsusage.m4)
-m4_include(lib/util/xattr.m4)
-m4_include(lib/util/capability.m4)
-m4_include(lib/util/time.m4)
+m4_include(../lib/util/fault.m4)
+m4_include(../lib/util/signal.m4)
+m4_include(../lib/util/util.m4)
+m4_include(../lib/util/fsusage.m4)
+m4_include(../lib/util/xattr.m4)
+m4_include(../lib/util/capability.m4)
+m4_include(../lib/util/time.m4)
 m4_include(../lib/popt/samba.m4)
 m4_include(lib/charset/config.m4)
 m4_include(lib/socket/config.m4)
 m4_include(nsswitch/nsstest.m4)
 m4_include(../pidl/config.m4)
-m4_include(lib/zlib.m4)
+m4_include(../lib/zlib/zlib.m4)
+AC_ZLIB([
+SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
+],[
+SMB_INCLUDE_MK(lib/zlib.mk)
+])
+
 
 AC_CONFIG_FILES(../source4/lib/registry/registry.pc)
 AC_CONFIG_FILES(../source4/librpc/dcerpc.pc)
-AC_CONFIG_FILES(../source4/librpc/ndr.pc)
+AC_CONFIG_FILES(../librpc/ndr.pc)
 AC_CONFIG_FILES(../source4/lib/torture/torture.pc)
 AC_CONFIG_FILES(../source4/auth/gensec/gensec.pc)
 AC_CONFIG_FILES(../source4/param/samba-hostconfig.pc)
@@ -35,7 +61,7 @@ SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0,
        ]
 )
 
-SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.0,
+SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
        [],
        [
                m4_include(../lib/tdb/libtdb.m4)
@@ -87,7 +113,6 @@ eventsdir="../source4/lib/events"
 m4_include(lib/events/libevents.m4)
 
 dnl m4_include(auth/kerberos/config.m4)
-m4_include(scripting/python/config.m4)
 m4_include(auth/gensec/config.m4)
 m4_include(smbd/process_model.m4)
 m4_include(ntvfs/posix/config.m4)
@@ -95,7 +120,6 @@ m4_include(ntvfs/unixuid/config.m4)
 m4_include(auth/config.m4)
 m4_include(kdc/config.m4)
 m4_include(ntvfs/sysdep/config.m4)
-m4_include(lib/appweb/config.m4)
 m4_include(nsswitch/config.m4)
 
 dnl Samba 4 files