Remove smb_np_struct
[Samba/gebeck_regimport.git] / source3 / samba4.m4
blob9cf01507def3a28ac05ba1dbd6797f82f17a5784
1 BLDSHARED=true
2 AC_SUBST(BLDSHARED)
3 smbtorture4_path=bin/smbtorture4
4 m4_include(build/m4/public.m4)
6 m4_include(lib/smbreadline/readline.m4)
7 m4_include(heimdal_build/internal.m4)
8 m4_include(../lib/util/fault.m4)
9 m4_include(../lib/util/signal.m4)
10 m4_include(../lib/util/util.m4)
11 m4_include(../lib/util/fsusage.m4)
12 m4_include(../lib/util/xattr.m4)
13 m4_include(../lib/util/capability.m4)
14 m4_include(../lib/util/time.m4)
15 m4_include(../lib/popt/samba.m4)
16 m4_include(lib/charset/config.m4)
17 m4_include(lib/socket/config.m4)
18 m4_include(nsswitch/nsstest.m4)
19 m4_include(../pidl/config.m4)
20 m4_include(lib/zlib.m4)
22 AC_CONFIG_FILES(../source4/lib/registry/registry.pc)
23 AC_CONFIG_FILES(../source4/librpc/dcerpc.pc)
24 AC_CONFIG_FILES(../source4/librpc/ndr.pc)
25 AC_CONFIG_FILES(../source4/lib/torture/torture.pc)
26 AC_CONFIG_FILES(../source4/auth/gensec/gensec.pc)
27 AC_CONFIG_FILES(../source4/param/samba-hostconfig.pc)
28 AC_CONFIG_FILES(../source4/librpc/dcerpc_samr.pc)
29 AC_CONFIG_FILES(../source4/librpc/dcerpc_atsvc.pc)
31 SMB_EXT_LIB_FROM_PKGCONFIG(LIBTALLOC, talloc >= 1.2.0,
32         [],
33         [
34                 SMB_INCLUDE_MK(../lib/talloc/config.mk)
35         ]
38 SMB_EXT_LIB_FROM_PKGCONFIG(LIBTDB, tdb >= 1.1.3,
39         [],
40         [
41                 m4_include(../lib/tdb/libtdb.m4)
42                 SMB_INCLUDE_MK(../lib/tdb/config.mk)
43         ]
46 SMB_INCLUDE_MK(../lib/tdb/python.mk) 
48 SMB_EXT_LIB_FROM_PKGCONFIG(LIBLDB, ldb >= 0.9.1,
49         [
50                 SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
51                 SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
52                 define_ldb_modulesdir=no
53         ],
54         [
55                 # Here we need to do some tricks
56                 # with AC_CONFIG_COMMANDS_PRE
57                 # as that's the deferrs the commands
58                 # to location after $prefix and $exec_prefix
59                 # have usefull values and directly before
60                 # creating config.status.
61                 #
62                 # The 'eval eval echo' trick is used to
63                 # actually get the raw absolute directory
64                 # path as this is needed in config.h
65                 define_ldb_modulesdir=yes
66                 AC_CONFIG_COMMANDS_PRE([
67                 if test x"$define_ldb_modulesdir" = x"yes";then
68                         LDB_MODULESDIR=`eval eval echo ${modulesdir}/ldb`
69                         AC_DEFINE_UNQUOTED(LDB_MODULESDIR, "${LDB_MODULESDIR}" , [ldb Modules directory])
70                 fi
71                 ])
72                 ldbdir="\$(abspath \$(srcdir)/../source4/lib/ldb)"
73                 AC_SUBST(ldbdir)
74                 m4_include(lib/ldb/sqlite3.m4)
75                 m4_include(lib/ldb/libldb.m4)
76                 SMB_INCLUDE_MK(lib/ldb/config.mk)
77                 AC_CONFIG_FILES(../source4/lib/ldb/ldb.pc)
78         ]
80 SMB_INCLUDE_MK(lib/ldb/python.mk) 
82 # Not sure why we need this..
83 SMB_ENABLE(swig_ldb,YES)
85 m4_include(lib/tls/config.m4)
86 eventsdir="../source4/lib/events"
87 m4_include(lib/events/libevents.m4)
89 dnl m4_include(auth/kerberos/config.m4)
90 m4_include(scripting/python/config.m4)
91 m4_include(auth/gensec/config.m4)
92 m4_include(smbd/process_model.m4)
93 m4_include(ntvfs/posix/config.m4)
94 m4_include(ntvfs/unixuid/config.m4)
95 m4_include(auth/config.m4)
96 m4_include(kdc/config.m4)
97 m4_include(ntvfs/sysdep/config.m4)
98 m4_include(nsswitch/config.m4)
100 dnl Samba 4 files
101 AC_SUBST(LD)
102 AC_LIBREPLACE_SHLD_FLAGS
103 SMB_WRITE_MAKEVARS(samba4-config.mk, [prefix exec_prefix CPPFLAGS LDSHFLAGS POPT_OBJ CFLAGS TALLOC_OBJ POPT_LIBS])
104                  
105 oldbuilddir="$builddir"
106 builddir="$builddir/../source4"
107 SMB_WRITE_PERLVARS(../source4/build/smb_build/config.pm)
108 builddir="$oldbuilddir"
110 echo "configure: creating ../source4/config.mk"
111 cat >../source4/config.mk<<CEOF
112 # config.mk - Autogenerated by configure, DO NOT EDIT!
113 $SMB_INFO_EXT_LIBS
114 $SMB_INFO_SUBSYSTEMS
115 $SMB_INFO_LIBRARIES
116 CEOF
118 AC_OUTPUT_COMMANDS([
119 cd ${srcdir}/../source4
120 USESHARED=false $PERL -I${builddir} -I${builddir}/build \
121     -I. -Ibuild \
122     build/smb_build/main.pl --output=../source3/samba4-data.mk main.mk || exit $?
123 cd ../source3
125 srcdir="$srcdir"
126 builddir="$builddir"
127 PERL="$PERL"
129 export PERL
130 export srcdir
131 export builddir
134 AC_CONFIG_COMMANDS([Makefile-samba4], [
135 echo "include samba4.mk" >> ${builddir}/Makefile