summaryrefslogtreecommitdiff
path: root/dynconfig/config.m4
blob: fe69abeee402fd269b98d682ef46a53783a3f100 (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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
#################################################
# Directory handling stuff to support both the
# legacy SAMBA directories and FHS compliant
# ones...
AC_PREFIX_DEFAULT(/usr/local/samba)

BINDIR="${bindir}"
SBINDIR="${sbindir}"
LIBDIR="${libdir}"
LIBEXECDIR="${libexecdir}"
MANDIR="${mandir}"
DATADIR="${datadir}"
LOCALEDIR="${localedir}"
SCRIPTSBINDIR="${sbindir}"
#PYTHONDIR
#PYTHONARCHDIR

AC_ARG_ENABLE(fhs,
[AS_HELP_STRING([--enable-fhs], [Turn on FHS support (default=no)])])

if test x$enable_fhs != xyes; then
	if test x"$prefix" = x"/usr" -o x"$prefix" = x"/usr/local"; then
		AC_MSG_WARN([Don't install directly under /usr or /usr/local without using the FHS option (--enable-fhs)])
		AC_MSG_ERROR([invalid --prefix=$prefix])
	fi
	MODULESDIR="${libdir}"
	INCLUDEDIR="${includedir}"
	SETUPDIR="${datadir}/setup"
	PKGCONFIGDIR="${libdir}/pkgconfig"
	CODEPAGEDIR="${datadir}/codepages"
	PAMMODULESDIR="${libdir}/security"
	CONFIGDIR="\${sysconfdir}"
	PRIVATE_DIR="\${prefix}/private"
	LOCKDIR="\${localstatedir}/lock"
	PIDDIR="\${localstatedir}/run"
	STATEDIR="\${localstatedir}/locks"
	CACHEDIR="\${localstatedir}/cache"
	LOGFILEBASE="\${localstatedir}"
	SOCKET_DIR="\${localstatedir}/run"
	PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib"
else
	AC_DEFINE(FHS_COMPATIBLE, 1, [Whether to use fully FHS-compatible paths])

	MODULESDIR="${libdir}/samba"
	INCLUDEDIR="${includedir}/samba-4.0"
	SETUPDIR="${datadir}/samba/setup"
	PKGCONFIGDIR="${libdir}/pkgconfig"
	CODEPAGEDIR="${datadir}/samba/codepages"
	PAMMODULESDIR="${libdir}/security"
	CONFIGDIR="\${sysconfdir}/samba"
	PRIVATE_DIR="\${localstatedir}/lib/samba/private"
	LOCKDIR="\${localstatedir}/lock/samba"
	PIDDIR="\${localstatedir}/run/samba"
	STATEDIR="\${localstatedir}/lib/samba"
	CACHEDIR="\${localstatedir}/cache/samba"
	LOGFILEBASE="\${localstatedir}/log/samba"
	SOCKET_DIR="\${localstatedir}/run/samba"
	PRIVILEGED_SOCKET_DIR="\${localstatedir}/lib/samba"
fi

AC_ARG_WITH(modulesdir,
[AS_HELP_STRING([--with-modulesdir=DIR],
 [Which directory to use for modules ($exec_prefix/modules)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-modulesdir called without argument - will use default])
  ;;
  * )
    MODULESDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(pammodulesdir,
[AS_HELP_STRING([--with-pammodulesdir=DIR],
 [Which directory to use for PAM modules ($libdir/security)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-pammodulesdir called without argument - will use default])
  ;;
  * )
    PAMMODULESDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(configdir,
[AS_HELP_STRING([--with-configdir=DIR],
 [Where to put configuration files ($sysconfdir)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-configdir called without argument - will use default])
  ;;
  * )
    CONFIGDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(privatedir,
[AS_HELP_STRING([--with-privatedir=DIR],
 [Where to put passdb.tdb and other private files ($prefix/private)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-privatedir called without argument - will use default])
  ;;
  * )
    PRIVATE_DIR="$withval"
  ;;
  esac])

AC_ARG_WITH(lockdir,
[AS_HELP_STRING([--with-lockdir=DIR],
 [Where to put short term disposable state files ($localstatedir/lock)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-lockdir called without argument - will use default])
  ;;
  * )
    LOCKDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(piddir,
[AS_HELP_STRING([--with-piddir=DIR],
 [Where to put pid files ($localstatedir/run)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-piddir called without argument - will use default])
  ;;
  * )
    PIDDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(statedir,
[AS_HELP_STRING([--with-statedir=DIR],
 [Where to put persistent state files ($localstatedir/locks)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-statedir called without argument - will use default])
  ;;
  * )
    STATEDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(cachedir,
[AS_HELP_STRING([--with-cachedir=DIR],
 [Where to put temporary cache files ($localstatedir/cache)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-cachedir called without argument - will use default])
  ;;
  * )
    CACHEDIR="$withval"
  ;;
  esac])

AC_ARG_WITH(logfilebase,
[AS_HELP_STRING([--with-logfilebase=DIR],
 [Where to put log files ($localstatedir)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-logfilebase called without argument - will use default])
  ;;
  * )
    LOGFILEBASE="$withval"
  ;;
  esac])

AC_ARG_WITH(sockets-dir,
[AS_HELP_STRING([--with-sockets-dir=DIR],
 [socket directory ($localstatedir/run)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
  ;;
  * )
    SOCKET_DIR="$withval"
  ;;
  esac])

AC_ARG_WITH(privileged-socket-dir,
[AS_HELP_STRING([--with-privileged-socket-dir=DIR],
 [privileged socket directory ($localstatedir/lib)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-sockets-dir called without argument - will use default])
  ;;
  * )
    PRIVILEGED_SOCKET_DIR="$withval"
  ;;
  esac])

WINBINDD_SOCKET_DIR="${SOCKET_DIR}/winbindd"
WINBINDD_PRIVILEGED_SOCKET_DIR="${PRIVILEGED_SOCKET_DIR}/winbindd_privileged"

AC_ARG_WITH(winbind-socket-dir,
[AS_HELP_STRING([--with-winbind-socket-dir=DIR],
 [winbnd socket directory ($localstatedir/run/winbindd)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-winbind-socket-dir called without argument - will use default])
  ;;
  * )
    WINBINDD_SOCKET_DIR="$withval"
  ;;
  esac])

AC_ARG_WITH(winbind-privileged-socket-dir,
[AS_HELP_STRING([--with-winbind-privileged-socket-dir=DIR],
 [winbind privileged socket directory ($localstatedir/lib/winbindd)])],
[ case "$withval" in
  yes|no)
  #
  # Just in case anybody calls it without argument
  #
    AC_MSG_WARN([--with-winbind-privileged-socket-dir called without argument - will use default])
  ;;
  * )
    WINBINDD_PRIVILEGED_SOCKET_DIR="$withval"
  ;;
  esac])

NMBDSOCKETDIR="${SOCKET_DIR}/nmbd"
NTP_SIGND_SOCKET_DIR="${SOCKET_DIR}/ntp_signd"
NCALRPCDIR="${SOCKET_DIR}/ncalrpc"
CONFIGFILE="${CONFIGDIR}/smb.conf"
LMHOSTSFILE="${CONFIGDIR}/lmhosts"
SMB_PASSWD_FILE="${PRIVATE_DIR}/smbpasswd"

AC_SUBST(BINDIR)
AC_SUBST(SBINDIR)
AC_SUBST(LIBDIR)
AC_SUBST(LIBEXECDIR)
AC_SUBST(MANDIR)
AC_SUBST(DATADIR)
AC_SUBST(LOCALEDIR)
AC_SUBST(SCRIPTSBINDIR)
dnl AC_SUBST(PYTHONDIR)
dnl AC_SUBST(PYTHONARCHDIR)
AC_SUBST(MODULESDIR)
AC_SUBST(INCLUDEDIR)
AC_SUBST(SETUPDIR)
AC_SUBST(PKGCONFIGDIR)
AC_SUBST(CODEPAGEDIR)
AC_SUBST(PAMMODULESDIR)
AC_SUBST(CONFIGDIR)
AC_SUBST(PRIVATE_DIR)
AC_SUBST(LOCKDIR)
AC_SUBST(PIDDIR)
AC_SUBST(STATEDIR)
AC_SUBST(CACHEDIR)
AC_SUBST(LOGFILEBASE)
AC_SUBST(SOCKET_DIR)
AC_SUBST(PRIVILEGED_SOCKET_DIR)
AC_SUBST(WINBINDD_SOCKET_DIR)
AC_SUBST(WINBINDD_PRIVILEGED_SOCKET_DIR)
AC_SUBST(NMBDSOCKETDIR)
AC_SUBST(NTP_SIGND_SOCKET_DIR)
AC_SUBST(NCALRPCDIR)
AC_SUBST(CONFIGFILE)
AC_SUBST(LMHOSTSFILE)
AC_SUBST(SMB_PASSWD_FILE)