803ed57bbd962c5e5e0f299c8fb213a535ccb568
[samba.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(include/includes.h)
8 AC_CONFIG_HEADER(include/config.h)
9
10 sinclude(build/smb_build/env.m4)
11
12 SMB_INCLUDE_M4(build/m4/rewrite.m4)
13
14 SMB_INCLUDE_M4(lib/popt/config.m4)
15 SMB_INCLUDE_M4(lib/iconv.m4)
16 SMB_INCLUDE_M4(lib/basic.m4)
17 SMB_INCLUDE_M4(lib/tdb/config.m4)
18 SMB_INCLUDE_M4(lib/ldb/config.m4)
19 SMB_INCLUDE_M4(lib/cmdline/config.m4)
20 SMB_INCLUDE_M4(param/config.m4)
21 SMB_INCLUDE_M4(libcli/config.m4)
22 SMB_INCLUDE_M4(librpc/config.m4)
23 SMB_INCLUDE_M4(libcli/libsmb.m4)
24 SMB_INCLUDE_M4(smbd/process_model.m4)
25 SMB_INCLUDE_M4(smb_server/config.m4)
26 SMB_INCLUDE_M4(auth/config.m4)
27 SMB_INCLUDE_M4(ntvfs/config.m4)
28 SMB_INCLUDE_M4(rpc_server/config.m4)
29 SMB_INCLUDE_M4(lib/registry/config.m4)
30 SMB_INCLUDE_M4(torture/config.m4)
31 SMB_INCLUDE_M4(scripting/config.m4)
32 SMB_INCLUDE_M4(client/config.m4)
33 SMB_INCLUDE_M4(utils/config.m4)
34 SMB_INCLUDE_M4(smbd/config.m4)
35 SMB_INCLUDE_M4(gtk/config.m4)
36
37 ALLLIBS_LIBS="$LIBS"
38 ALLLIBS_CFLAGS="$CFLAGS"
39 ALLLIBS_CPPFLAGS="$CPPFLAGS"
40 ALLLIBS_LDFLAGS="$LDFLAGS"
41
42 SMB_EXT_LIB_ENABLE(ALLLIBS,YES)
43
44 SMB_EXT_LIB(ALLLIBS,
45                 [${ALLLIBS_LIBS}],
46                 [${ALLLIBS_CFLAGS}],
47                 [${ALLLIBS_CPPFLAGS}],
48                 [${ALLLIBS_LDFLAGS}])
49
50 AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])
51
52 #################################################
53 # do extra things if we are running insure
54
55 if test "${ac_cv_prog_CC}" = "insure"; then
56         CPPFLAGS="$CPPFLAGS -D__INSURE__"
57 fi
58
59 #################################################
60 # final configure stuff
61
62 AC_MSG_CHECKING([configure summary])
63 AC_TRY_RUN([#include "${srcdir-.}/build/tests/summary.c"],
64            AC_MSG_RESULT(yes),
65            AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
66            AC_MSG_WARN([cannot run when cross-compiling]))
67
68 builddir=`pwd`
69 AC_SUBST(builddir)
70
71 dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
72 LIB_REMOVE_USR_LIB(LDFLAGS)
73 LIB_REMOVE_USR_LIB(LIBS)
74
75 dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
76 CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
77 CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
78
79 SMB_AC_OUTPUT(Makefile)