summaryrefslogtreecommitdiff
path: root/source4/configure.in
blob: e4bcc64fe967a750cbc5b6a2f81d9ece24879495 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
dnl -*- mode: m4-mode -*-
dnl Process this file with autoconf to produce a configure script.

dnl disabled 2.53 requirement - we do work with 2.52 on suse 7.3 for example
dnl AC_PREREQ(2.53)

AC_INIT([samba],[],[samba-technical@samba.org])

AC_CONFIG_SRCDIR([include/includes.h])
AC_CONFIG_HEADER(include/config.h)

sinclude(build/m4/env.m4)
sinclude(build/m4/rewrite.m4)
sinclude(lib/replace/win32/config.m4)
sinclude(lib/replace/repdir/config.m4)
sinclude(heimdal_build/config.m4)
sinclude(lib/popt/config.m4)
sinclude(lib/iconv.m4)
sinclude(lib/socket/config.m4)
sinclude(lib/talloc/config.m4)
sinclude(lib/tdb/config.m4)
sinclude(lib/ldb/sqlite3.m4)
sinclude(lib/ldb/config.m4)
sinclude(lib/tls/config.m4)
sinclude(lib/events/config.m4)
sinclude(lib/cmdline/config.m4)

dnl disabled until we support external heimdal again
dnl sinclude(auth/kerberos/config.m4)

sinclude(auth/gensec/config.m4)
sinclude(libcli/config.m4)
sinclude(smbd/process_model.m4)
sinclude(lib/registry/config.m4)
sinclude(scripting/config.m4)
sinclude(gtk/config.m4)
sinclude(ntvfs/posix/config.m4)
sinclude(lib/socket_wrapper/config.m4)
sinclude(web_server/config.m4)
sinclude(auth/config.m4)
sinclude(kdc/config.m4)

AC_DEFINE_UNQUOTED(STRING_STATIC_MODULES, "$string_static_modules", [String list of builtin modules])

#################################################
# do extra things if we are running insure

if test "${ac_cv_prog_CC}" = "insure"; then
	CPPFLAGS="$CPPFLAGS -D__INSURE__"
fi

#################################################
# add DEVELOPER_CFLAGS only for the real build
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"

#################################################
# final configure stuff

AC_MSG_CHECKING([configure summary])
AC_TRY_RUN([#include "${srcdir-.}/build/tests/summary.c"],
           AC_MSG_RESULT(yes),
	   AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
	   AC_MSG_WARN([cannot run when cross-compiling]))

builddir=`pwd`
AC_SUBST(builddir)

dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
LIB_REMOVE_USR_LIB(LDFLAGS)
LIB_REMOVE_USR_LIB(LIBS)

dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)

echo "configure: creating config.pl"
cat >config.pm<<CEOF
# config.pm - Autogenerate by configure. DO NOT EDIT!

package config;
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(%enabled %config);
use strict;

use vars qw(%enabled %config);

%config = (AC_FOREACH([AC_Var], m4_defn([_AC_SUBST_VARS]), [
	AC_Var => '$AC_Var',])
);

$SMB_INFO_ENABLES
1;
CEOF

echo "configure: creating config.mk"
cat >config.mk<<CEOF
# config.mk - Autogenerated by configure, DO NOT EDIT!
$SMB_INFO_EXT_LIBS
$SMB_INFO_SUBSYSTEMS
$SMB_INFO_LIBRARIES
CEOF

AC_OUTPUT(Makefile,,[$PERL -Ibuild build/smb_build/main.pl])