~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source4/configure.ac

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl -*- mode: m4-mode -*-
2
 
dnl Process this file with autoconf to produce a configure script.
3
 
 
4
 
AC_PREREQ(2.54)
5
 
 
6
 
AC_INIT([samba],[4],[samba-technical@samba.org])
7
 
 
8
 
AC_CONFIG_SRCDIR([include/includes.h])
9
 
AC_CONFIG_HEADER(include/config_tmp.h)
10
 
AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h.])
11
 
 
12
 
# Configuration rules.
13
 
m4_include(build/m4/env.m4)
14
 
m4_include(../lib/replace/samba.m4)
15
 
m4_include(lib/smbreadline/readline.m4)
16
 
m4_include(heimdal_build/config.m4)
17
 
m4_include(../lib/util/fault.m4)
18
 
m4_include(../lib/util/signal.m4)
19
 
m4_include(../lib/util/util.m4)
20
 
m4_include(../lib/util/fsusage.m4)
21
 
m4_include(../lib/util/xattr.m4)
22
 
m4_include(../lib/util/capability.m4)
23
 
m4_include(../lib/util/time.m4)
24
 
m4_include(../lib/popt/samba.m4)
25
 
m4_include(../lib/util/charset/config.m4)
26
 
m4_include(lib/socket/config.m4)
27
 
m4_include(../lib/zlib/zlib.m4)
28
 
AC_ZLIB([
29
 
SMB_EXT_LIB(ZLIB, [${ZLIB_LIBS}])
30
 
],[
31
 
SMB_INCLUDE_MK(lib/zlib.mk)
32
 
])
33
 
m4_include(../nsswitch/nsstest.m4)
34
 
m4_include(../pidl/config.m4)
35
 
m4_include(client/config.m4)
36
 
 
37
 
AC_CONFIG_FILES(lib/registry/registry.pc)
38
 
AC_CONFIG_FILES(librpc/dcerpc.pc)
39
 
AC_CONFIG_FILES(../librpc/ndr.pc)
40
 
AC_CONFIG_FILES(../librpc/ndr_standard.pc)
41
 
AC_CONFIG_FILES(../lib/torture/torture.pc)
42
 
AC_CONFIG_FILES(auth/gensec/gensec.pc)
43
 
AC_CONFIG_FILES(param/samba-hostconfig.pc)
44
 
AC_CONFIG_FILES(librpc/dcerpc_samr.pc)
45
 
AC_CONFIG_FILES(librpc/dcerpc_atsvc.pc)
46
 
 
47
 
m4_include(min_versions.m4)
48
 
 
49
 
SMB_INCLUDED_LIB_PKGCONFIG(LIBTALLOC, talloc >= TALLOC_MIN_VERSION, [],
50
 
        [
51
 
                m4_include(../lib/talloc/libtalloc.m4)
52
 
                SMB_INCLUDE_MK(../lib/talloc/config.mk)
53
 
        ]
54
 
)
55
 
 
56
 
SMB_INCLUDED_LIB_PKGCONFIG(LIBTDB, tdb >= TDB_MIN_VERSION,
57
 
        [
58
 
                AC_MSG_CHECKING([for Python TDB bindings])
59
 
                if $PYTHON -c "from tdb import open" 2>/dev/null; then
60
 
                        AC_MSG_RESULT(yes)
61
 
                else
62
 
                        SMB_INCLUDE_MK(../lib/tdb/python.mk) 
63
 
                        AC_MSG_RESULT(no)
64
 
                fi
65
 
         ],
66
 
        [
67
 
                m4_include(../lib/tdb/libtdb.m4)
68
 
                SMB_INCLUDE_MK(../lib/tdb/config.mk)
69
 
                SMB_INCLUDE_MK(../lib/tdb/python.mk) 
70
 
        ]
71
 
)
72
 
 
73
 
SMB_INCLUDED_LIB_PKGCONFIG(LIBTEVENT, tevent = TEVENT_REQUIRED_VERSION,
74
 
        [],[m4_include(../lib/tevent/samba.m4)]
75
 
)
76
 
 
77
 
SMB_INCLUDED_LIB_PKGCONFIG(LIBLDB, ldb = LDB_REQUIRED_VERSION,
78
 
        [
79
 
                SMB_INCLUDE_MK(lib/ldb/ldb_ildap/config.mk)
80
 
                SMB_INCLUDE_MK(lib/ldb/tools/config.mk)
81
 
                define_ldb_modulesdir=no
82
 
                AC_MSG_CHECKING([for Python LDB bindings])
83
 
                if $PYTHON -c "import ldb" 2>/dev/null; then
84
 
                        AC_MSG_RESULT(yes)
85
 
                else
86
 
                        SMB_INCLUDE_MK(lib/ldb/python.mk) 
87
 
                        AC_MSG_RESULT(no)
88
 
                fi
89
 
 
90
 
        ],
91
 
        [
92
 
                # Here we need to do some tricks
93
 
                # with AC_CONFIG_COMMANDS_PRE
94
 
                # as that's the deferrs the commands
95
 
                # to location after $prefix and $exec_prefix
96
 
                # have usefull values and directly before
97
 
                # creating config.status.
98
 
                #
99
 
                # The 'eval eval echo' trick is used to
100
 
                # actually get the raw absolute directory
101
 
                # path as this is needed in config.h
102
 
                define_ldb_modulesdir=yes
103
 
                AC_CONFIG_COMMANDS_PRE([
104
 
                if test x"$define_ldb_modulesdir" = x"yes";then
105
 
                        LDB_MODULESDIR=`eval eval echo ${modulesdir}/ldb`
106
 
                        AC_DEFINE_UNQUOTED(LDB_MODULESDIR, "${LDB_MODULESDIR}" , [ldb Modules directory])
107
 
                fi
108
 
                ])
109
 
                ldbdir=lib/ldb
110
 
                AC_SUBST(ldbdir)
111
 
                m4_include(lib/ldb/sqlite3.m4)
112
 
                m4_include(lib/ldb/libldb.m4)
113
 
                SMB_INCLUDE_MK(lib/ldb/config.mk)
114
 
                AC_CONFIG_FILES(lib/ldb/ldb.pc)
115
 
                SMB_INCLUDE_MK(lib/ldb/python.mk) 
116
 
        ])
117
 
 
118
 
m4_include(lib/tls/config.m4)
119
 
m4_include(torture/libnetapi/config.m4)
120
 
 
121
 
dnl m4_include(auth/kerberos/config.m4)
122
 
m4_include(auth/gensec/config.m4)
123
 
m4_include(smbd/process_model.m4)
124
 
m4_include(ntvfs/posix/config.m4)
125
 
m4_include(ntvfs/unixuid/config.m4)
126
 
m4_include(../lib/socket_wrapper/config.m4)
127
 
m4_include(../lib/nss_wrapper/config.m4)
128
 
m4_include(../lib/uid_wrapper/config.m4)
129
 
m4_include(auth/config.m4)
130
 
m4_include(kdc/config.m4)
131
 
m4_include(ntvfs/sysdep/config.m4)
132
 
m4_include(../nsswitch/config.m4)
133
 
 
134
 
#################################################
135
 
# add *_CFLAGS only for the real build
136
 
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
137
 
 
138
 
#################################################
139
 
# final configure stuff
140
 
 
141
 
AC_MSG_CHECKING([configure summary])
142
 
AC_TRY_RUN([#include "${srcdir-.}/../tests/summary.c"],
143
 
           AC_MSG_RESULT(yes),
144
 
           AC_MSG_ERROR([summary failure. Aborting config]); exit 1;,
145
 
           AC_MSG_WARN([cannot run when cross-compiling]))
146
 
 
147
 
LIBS=`echo $LIBS | sed -e 's/ *//g'`
148
 
if test x"$LIBS" != x""; then
149
 
        echo "LIBS: $LIBS"
150
 
        AC_MSG_WARN([the global \$LIBS variable contains some libraries!])
151
 
        AC_MSG_WARN([this should not happen, please report to samba-technical@lists.samba.org!])
152
 
        AC_MSG_ERROR([only _EXT macros from aclocal.m4 should be used!])
153
 
fi
154
 
 
155
 
dnl Remove -L/usr/lib/? from LDFLAGS and LIBS
156
 
LIB_REMOVE_USR_LIB(LDFLAGS)
157
 
LIB_REMOVE_USR_LIB(LIBS)
158
 
 
159
 
dnl Remove -I/usr/include/? from CFLAGS and CPPFLAGS
160
 
CFLAGS_REMOVE_USR_INCLUDE(CFLAGS)
161
 
CFLAGS_REMOVE_USR_INCLUDE(CPPFLAGS)
162
 
 
163
 
AC_SUBST(ac_default_prefix)
164
 
 
165
 
for d in build/smb_build bin include ; do
166
 
    test -d ${builddir}/$d || AS_MKDIR_P(${builddir}/$d)
167
 
done
168
 
 
169
 
AC_SUBST(INTERN_LDFLAGS)
170
 
AC_SUBST(INSTALL_LINK_FLAGS)
171
 
if test $USESHARED = "true";
172
 
then
173
 
        INTERN_LDFLAGS="-L\$(shliboutputdir) -L\${builddir}/bin/static"
174
 
        INSTALL_LINK_FLAGS="-Wl,-rpath-link,\$(shliboutputdir)";
175
 
else
176
 
        INTERN_LDFLAGS="-L\${builddir}/bin/static -L\$(shliboutputdir)"
177
 
fi
178
 
 
179
 
builddir_headers=""
180
 
        
181
 
if test "x$ac_abs_srcdir" != "x$ac_abs_builddir"
182
 
then
183
 
        builddir_headers="-I\$(builddir)/include -I\$(builddir) -I\$(builddir)/lib ";
184
 
fi
185
 
 
186
 
CPPFLAGS="$builddir_headers-I\$(srcdir)/include -I\$(srcdir) -I\$(srcdir)/lib -I\$(srcdir)/../lib/replace -I\$(srcdir)/../lib/talloc -I\$(srcdir)/.. -D_SAMBA_BUILD_=4 -DHAVE_CONFIG_H $CPPFLAGS"
187
 
 
188
 
SMB_WRITE_PERLVARS(build/smb_build/config.pm)
189
 
 
190
 
echo "configure: creating config.mk"
191
 
cat >config.mk<<CEOF
192
 
# config.mk - Autogenerated by configure, DO NOT EDIT!
193
 
$SMB_INFO_EXT_LIBS
194
 
$SMB_INFO_SUBSYSTEMS
195
 
$SMB_INFO_LIBRARIES
196
 
CEOF
197
 
 
198
 
SMB_BUILD_RUN(data.mk)
199
 
AC_OUTPUT
200
 
 
201
 
cmp include/config_tmp.h include/config.h >/dev/null 2>&1
202
 
CMP_RET=$?
203
 
if test $CMP_RET != 0; then
204
 
        cp include/config_tmp.h include/config.h
205
 
fi
206
 
 
207
 
SMB_WRITE_MAKEVARS(mkconfig.mk)
208
 
 
209
 
if test $USESHARED = true
210
 
then
211
 
        echo "To run binaries without installing, set the following environment variable:"
212
 
        echo "$LIB_PATH_VAR=$builddir/bin/shared"
213
 
fi
214
 
 
215
 
echo
216
 
echo "To build Samba, run $MAKE"