51589e9fe80dc21ead88ffb2f2a2d7724a0e2f65
[sfrench/samba-autobuild/.git] / source / configure.in
1 dnl -*- mode: m4-mode -*-
2 dnl Process this file with autoconf to produce a configure script.
3
4 dnl disabled 2.53 requirement - we do work with 2.52 on suse 7.3 for example
5 dnl AC_PREREQ(2.53)
6
7 AC_INIT([samba],[],[samba-technical@samba.org])
8 AC_CONFIG_SRCDIR([include/includes.h])
9 AC_CONFIG_HEADER(include/config.h)
10
11 sinclude(build/m4/env.m4)
12 sinclude(build/m4/rewrite.m4)
13 sinclude(lib/replace/win32/config.m4)
14 sinclude(lib/replace/repdir/config.m4)
15 sinclude(heimdal_build/config.m4)
16 sinclude(lib/popt/config.m4)
17 sinclude(lib/iconv.m4)
18 sinclude(lib/socket/config.m4)
19 sinclude(lib/talloc/config.m4)
20 sinclude(lib/tdb/config.m4)
21 sinclude(lib/ldb/sqlite3.m4)
22 sinclude(lib/ldb/config.m4)
23 sinclude(lib/tls/config.m4)
24 sinclude(lib/events/config.m4)
25 sinclude(lib/cmdline/config.m4)
26
27 dnl disabled until we support external heimdal again
28 dnl sinclude(auth/kerberos/config.m4)
29
30 sinclude(auth/gensec/config.m4)
31 sinclude(libcli/config.m4)
32 sinclude(smbd/process_model.m4)
33 sinclude(lib/registry/config.m4)
34 sinclude(scripting/config.m4)
35 sinclude(gtk/config.m4)
36 sinclude(ntvfs/posix/config.m4)
37 sinclude(lib/socket_wrapper/config.m4)
38 sinclude(web_server/config.m4)
39 sinclude(auth/config.m4)
40 sinclude(kdc/config.m4)
41
42 ALLLIBS_LIBS="$LIBS"
43 ALLLIBS_CFLAGS="$CFLAGS"
44 ALLLIBS_CPPFLAGS="$CPPFLAGS"
45 ALLLIBS_LDFLAGS="$LDFLAGS"
46
47 SMB_EXT_LIB_ENABLE(ALLLIBS,YES)
48
49 SMB_EXT_LIB(ALLLIBS,
50                 [${ALLLIBS_LIBS}],
51                 [${ALLLIBS_CFLAGS}],
52                 [${ALLLIBS_CPPFLAGS}],
53                 [${ALLLIBS_LDFLAGS}])
54
55 AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])
56
57 #################################################
58 # do extra things if we are running insure
59
60 if test "${ac_cv_prog_CC}" = "insure"; then
61         CPPFLAGS="$CPPFLAGS -D__INSURE__"
62 fi
63
64 #################################################
65 # add DEVELOPER_CFLAGS only for the real build
66 CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
67
68 #################################################
69 # final configure stuff
70
71 AC_MSG_CHECKING([configure summary])
72 AC_TRY_RUN([#include "${srcdir-.}/build/tests/summary.c"],
73            AC_MSG_RESULT(yes),
74            AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
75            AC_MSG_WARN([cannot run when cross-compiling]))
76
77 builddir=`pwd`
78 AC_SUBST(builddir)
79
80 dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
81 LIB_REMOVE_USR_LIB(LDFLAGS)
82 LIB_REMOVE_USR_LIB(LIBS)
83
84 dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
85 CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
86 CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
87
88 SMB_AC_OUTPUT(Makefile)