587f220d19104ecd1fc4a5424c7ad616dfcf78c8
[bbaumbach/samba-autobuild/.git] / source4 / 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(heimdal_build/config.m4)
15 sinclude(lib/popt/config.m4)
16 sinclude(lib/iconv.m4)
17 sinclude(lib/socket/config.m4)
18 sinclude(lib/talloc/config.m4)
19 sinclude(lib/tdb/config.m4)
20 sinclude(lib/ldb/sqlite3.m4)
21 sinclude(lib/ldb/config.m4)
22 sinclude(lib/events/config.m4)
23 sinclude(lib/cmdline/config.m4)
24
25 dnl disabled until we support external heimdal again
26 dnl sinclude(auth/kerberos/config.m4)
27
28 sinclude(auth/gensec/config.m4)
29 sinclude(libcli/config.m4)
30 sinclude(smbd/process_model.m4)
31 sinclude(lib/registry/config.m4)
32 sinclude(scripting/config.m4)
33 sinclude(gtk/config.m4)
34 sinclude(ntvfs/posix/config.m4)
35 sinclude(lib/socket_wrapper/config.m4)
36 sinclude(web_server/config.m4)
37 sinclude(auth/config.m4)
38 sinclude(kdc/config.m4)
39
40 ALLLIBS_LIBS="$LIBS"
41 ALLLIBS_CFLAGS="$CFLAGS"
42 ALLLIBS_CPPFLAGS="$CPPFLAGS"
43 ALLLIBS_LDFLAGS="$LDFLAGS"
44
45 SMB_EXT_LIB_ENABLE(ALLLIBS,YES)
46
47 SMB_EXT_LIB(ALLLIBS,
48                 [${ALLLIBS_LIBS}],
49                 [${ALLLIBS_CFLAGS}],
50                 [${ALLLIBS_CPPFLAGS}],
51                 [${ALLLIBS_LDFLAGS}])
52
53 AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])
54
55 #################################################
56 # do extra things if we are running insure
57
58 if test "${ac_cv_prog_CC}" = "insure"; then
59         CPPFLAGS="$CPPFLAGS -D__INSURE__"
60 fi
61
62 #################################################
63 # add DEVELOPER_CFLAGS only for the real build
64 CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
65
66 #################################################
67 # final configure stuff
68
69 AC_MSG_CHECKING([configure summary])
70 AC_TRY_RUN([#include "${srcdir-.}/build/tests/summary.c"],
71            AC_MSG_RESULT(yes),
72            AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
73            AC_MSG_WARN([cannot run when cross-compiling]))
74
75 builddir=`pwd`
76 AC_SUBST(builddir)
77
78 dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
79 LIB_REMOVE_USR_LIB(LDFLAGS)
80 LIB_REMOVE_USR_LIB(LIBS)
81
82 dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
83 CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
84 CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
85
86 SMB_AC_OUTPUT(Makefile)