~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to .pc/autofs-5.0.5-include-krb5-library.patch/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# configure.in for the autofs daemon
3
 
 
4
 
AC_PREREQ(2.5)
5
 
 
6
 
#
7
 
# Disable caching (the script is tiny, and it doesn't work with --with-path)
8
 
# then start autofs
9
 
#
10
 
define([AC_CACHE_LOAD], )dnl
11
 
define([AC_CACHE_SAVE], )dnl
12
 
AC_INIT(.autofs-5.0.5)
13
 
 
14
 
#
15
 
# autofs installs by default in /usr
16
 
#
17
 
AC_PREFIX_DEFAULT(/usr)
18
 
 
19
 
#
20
 
# The user can specify --with-path=PATH rather than relying on the default
21
 
#
22
 
searchpath="/usr/bin:/bin:/usr/sbin:/sbin"
23
 
AC_ARG_WITH(path,
24
 
[  --with-path=PATH       look in PATH for binaries needed by the automounter],
25
 
        if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
26
 
        then
27
 
                :
28
 
        else
29
 
                searchpath="${withval}"
30
 
        fi
31
 
)
32
 
 
33
 
AC_MSG_CHECKING([for binaries in])
34
 
AC_MSG_RESULT([$searchpath])
35
 
 
36
 
#
37
 
# Make sure we have "/proc"
38
 
#
39
 
AF_LINUX_PROCFS()
40
 
 
41
 
#
42
 
# Location of init.d directory?
43
 
#
44
 
AF_INIT_D()
45
 
AC_SUBST(initdir)
46
 
 
47
 
#
48
 
# Location of system config script directory?
49
 
#
50
 
AF_CONF_D()
51
 
AC_ARG_WITH(confdir,
52
 
[  --with-confdir=DIR     use DIR for autofs configuration files],
53
 
        if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
54
 
        then
55
 
                :
56
 
        else
57
 
                confdir="${withval}"
58
 
        fi
59
 
)
60
 
AC_MSG_CHECKING([for autofs configuration file directory])
61
 
AC_MSG_RESULT([$confdir])
62
 
AC_SUBST(confdir)
63
 
 
64
 
#
65
 
# The user can specify --with-mapsdir=PATH to specify autofs maps go
66
 
#
67
 
AF_MAP_D()
68
 
AC_ARG_WITH(mapdir,
69
 
[  --with-mapdir=PATH     look in PATH for mount maps used by the automounter],
70
 
        if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
71
 
        then
72
 
                :
73
 
        else
74
 
                mapdir="${withval}"
75
 
        fi
76
 
)
77
 
AC_MSG_CHECKING([for autofs maps directory])
78
 
AC_MSG_RESULT([$mapdir])
79
 
AC_SUBST(mapdir)
80
 
 
81
 
#
82
 
# The user can specify --with-fifodir=PATH to specify where autofs fifos go
83
 
#
84
 
AF_FIFO_D()
85
 
AC_ARG_WITH(fifodir,
86
 
[  --with-fifodir=PATH     use PATH as the directory for fifos used by the automounter],
87
 
        if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
88
 
        then
89
 
                :
90
 
        else
91
 
                fifodir="${withval}"
92
 
        fi
93
 
)
94
 
AC_MSG_CHECKING([for autofs fifos directory])
95
 
AC_MSG_RESULT([$fifodir])
96
 
AC_SUBST(fifodir)
97
 
 
98
 
#
99
 
# The user can specify --with-flagdir=PATH to specify where autofs flag file goes
100
 
#
101
 
AF_FLAG_D()
102
 
AC_ARG_WITH(flagdir,
103
 
[  --with-flagdir=PATH     use PATH as the directory for the flag file used by the automounter],
104
 
        if test -z "$withval" -o "$withval" = "yes" -o "$withval" = "no"
105
 
        then
106
 
                :
107
 
        else
108
 
                filagdir="${withval}"
109
 
        fi
110
 
)
111
 
AC_MSG_CHECKING([for autofs flag file directory])
112
 
AC_MSG_RESULT([$flagdir])
113
 
AC_SUBST(flagdir)
114
 
 
115
 
#
116
 
# Use libtirpc
117
 
#
118
 
AM_WITH_LIBTIRPC()
119
 
AC_SUBST(TIRPCLIB)
120
 
 
121
 
#
122
 
# Optional include dmalloc
123
 
#
124
 
AM_WITH_DMALLOC()
125
 
AC_SUBST(DMALLOCLIB)
126
 
 
127
 
#
128
 
# Programs needed for various system functions or modules
129
 
#
130
 
AF_PATH_INCLUDE(MOUNT, mount, /bin/mount, $searchpath)
131
 
AF_PATH_INCLUDE(UMOUNT, umount, /bin/umount, $searchpath)
132
 
AF_PATH_INCLUDE(E2FSCK, fsck.ext2 e2fsck, , $searchpath)
133
 
AF_PATH_INCLUDE(E3FSCK, fsck.ext3 e3fsck, , $searchpath)
134
 
AF_PATH_INCLUDE(E4FSCK, fsck.ext4 e4fsck, , $searchpath)
135
 
AF_PATH_INCLUDE(MODPROBE, modprobe, , $searchpath)
136
 
 
137
 
AF_CHECK_PROG(LEX, flex lex, , $searchpath)
138
 
AF_CHECK_PROG(YACC, bison, , $searchpath)
139
 
AF_CHECK_PROG(RANLIB, ranlib, , $searchpath)
140
 
AF_CHECK_PROG(RPCGEN, rpcgen, , $searchpath)
141
 
 
142
 
#
143
 
# Newer mounts have the -s (sloppy) option to ignore unknown options,
144
 
# good for portability
145
 
#
146
 
AF_SLOPPY_MOUNT()
147
 
 
148
 
# LDAP SASL auth need libxml
149
 
AF_CHECK_LIBXML()
150
 
 
151
 
#
152
 
# glibc/libc 6 new libraries
153
 
#
154
 
AC_CHECK_LIB(nsl, yp_match, LIBNSL="-lnsl")
155
 
AC_SUBST(LIBNSL)
156
 
 
157
 
AC_CHECK_LIB(resolv, res_query, LIBRESOLV="-lresolv")
158
 
AC_SUBST(LIBRESOLV)
159
 
 
160
 
#
161
 
# Hesiod support?  Expect that this may have a special directory...
162
 
#
163
 
AF_tmp_ldflags="$LDFLAGS"
164
 
LIBHESIOD=''
165
 
HAVE_HESIOD=''
166
 
AC_ARG_WITH(hesiod,
167
 
[  --with-hesiod=DIR      enable Hesiod support (libs and includes in DIR)],
168
 
        if test "$withval" = no
169
 
        then
170
 
                HAVE_HESIOD=0   # Disable
171
 
        elif test -z "$withval" -o "$withval" = 'yes'
172
 
        then
173
 
                : Search for Hesiod in normal directory path
174
 
        else
175
 
                : Search for Hesiod in specific directory
176
 
                LDFLAGS="$LDFLAGS -L${withval}/lib"
177
 
                LIBHESIOD="-L${withval}/lib"
178
 
                HESIOD_FLAGS="-I${withval}/include"
179
 
        fi
180
 
)       
181
 
 
182
 
if test -z "$HAVE_HESIOD" -o "$HAVE_HESIOD" != "0"
183
 
then
184
 
        HAVE_HESIOD=0
185
 
        AF_CHECK_LIBHESIOD()
186
 
        if test "$HAVE_HESIOD" == "1"; then
187
 
                AC_DEFINE(WITH_HESIOD,1,
188
 
                        [Define if using Hesiod as a source of automount maps])
189
 
        fi
190
 
fi
191
 
AC_SUBST(HAVE_HESIOD)
192
 
AC_SUBST(LIBHESIOD)
193
 
AC_SUBST(HESIOD_FLAGS)
194
 
LDFLAGS="${AF_tmp_ldflags}"
195
 
 
196
 
# NIS+ support?
197
 
HAVE_NISPLUS=0
198
 
AC_CHECK_HEADER(rpcsvc/nis.h, HAVE_NISPLUS=1)
199
 
AC_SUBST(HAVE_NISPLUS)
200
 
 
201
 
#
202
 
# OpenLDAP support?  Expect that this may have a special directory...
203
 
#
204
 
AF_tmp_ldflags="$LDFLAGS"
205
 
LIBLDAP=''
206
 
HAVE_LDAP=''
207
 
AC_ARG_WITH(openldap,
208
 
[  --with-openldap=DIR    enable OpenLDAP map support (libs and includes in DIR)],
209
 
        if test "$withval" = 'no'; then
210
 
                HAVE_LDAP=0     # Disable 
211
 
        elif test -z "$withval" -o "$withval" = 'yes'
212
 
        then
213
 
                : Search for LDAP in normal directory path
214
 
        else
215
 
                : Search for LDAP in specific directory
216
 
                LDFLAGS="$LDFLAGS -L${withval}/lib"
217
 
                LIBLDAP="-L${withval}/lib"
218
 
                LDAP_FLAGS="-I${withval}/include"
219
 
        fi
220
 
)
221
 
if test -z "$HAVE_LDAP" -o "$HAVE_LDAP" != "0"; then
222
 
        HAVE_LDAP=0
223
 
        LDAP_FLAGS="$LDAP_FLAGS -DLDAP_DEPRECATED=1"
224
 
        AC_CHECK_LIB(ldap, ldap_initialize, HAVE_LDAP=1 LIBLDAP="$LIBLDAP -lldap -llber -lresolv", ,
225
 
                     -llber -lresolv $LIBS)
226
 
        if test "$HAVE_LDAP" = "1"; then
227
 
                AC_DEFINE(WITH_LDAP,1,
228
 
                        [Define if using LDAP as a source of automount maps])
229
 
        fi
230
 
        AF_CHECK_FUNC_LDAP_CREATE_PAGE_CONTROL()
231
 
        AF_CHECK_FUNC_LDAP_PARSE_PAGE_CONTROL()
232
 
fi
233
 
 
234
 
AC_SUBST(LDAP_FLAGS)
235
 
AC_SUBST(HAVE_LDAP)
236
 
AC_SUBST(LIBLDAP)
237
 
LDFLAGS="${AF_tmp_ldflags}"
238
 
 
239
 
#
240
 
# SASL support
241
 
#   configure magic taken from:
242
 
#       http://www.timof.qipc.org/autofs/autofs-4.1.4-ldap-20050930.patch
243
 
#
244
 
 
245
 
AF_tmp_ldflags="$LDFLAGS"
246
 
LIBSASL=''
247
 
HAVE_SASL=''
248
 
AC_ARG_WITH(sasl,
249
 
[  --with-sasl=DIR        enable SASL support for LDAP maps (libs and includes in DIR)],
250
 
        if test "$withval" = 'no'; then
251
 
                HAVE_SASL=0     # Disable
252
 
        elif test -z "$withval" -o "$withval" = 'yes'
253
 
        then
254
 
                : Search for SASL in normal directory path
255
 
        else
256
 
                : Search for SASL in specific directory
257
 
                HAVE_SASL=1
258
 
                LDFLAGS="$LDFLAGS -L${withval}/lib"
259
 
                LIBSASL="-L${withval}/lib"
260
 
                SASL_FLAGS="-I${withval}/include"
261
 
        fi
262
 
)
263
 
if test -z "$HAVE_SASL" -o "$HAVE_SASL" != "0" -a "$HAVE_LIBXML" == "1"
264
 
then
265
 
        HAVE_SASL=0
266
 
        AC_CHECK_LIB(sasl2, sasl_client_start, HAVE_SASL=1 LIBSASL="$LIBSASL -lsasl2", , -lsasl2 $LIBS)
267
 
        if test "$HAVE_SASL" == "1"; then
268
 
                AC_DEFINE(WITH_SASL,1,
269
 
                        [Define if using SASL authentication with the LDAP module])
270
 
        fi
271
 
fi
272
 
 
273
 
AC_SUBST(XML_FLAGS)
274
 
AC_SUBST(XML_LIBS)
275
 
AC_SUBST(SASL_FLAGS)
276
 
AC_SUBST(HAVE_SASL)
277
 
AC_SUBST(LIBSASL)
278
 
LDFLAGS="${AF_tmp_ldflags}"
279
 
 
280
 
#
281
 
# Does gcc support building position independent executables?
282
 
#
283
 
AC_PROG_CC
284
 
cat > pietest.c <<EOF
285
 
int main(void) { return 0; }
286
 
EOF
287
 
CFLAGS=-fPIE
288
 
LDFLAGS=-pie
289
 
DAEMON_CFLAGS=
290
 
DAEMON_LDFLAGS=
291
 
AC_MSG_CHECKING([whether gcc -fPIE works])
292
 
AC_RUN_IFELSE([AC_LANG_PROGRAM([[]], [[int main(void) {return 0;}]])],
293
 
              [gcc_supports_pie=yes], [gcc_supports_pie=no])
294
 
AC_MSG_RESULT([$gcc_supports_pie])
295
 
if test $gcc_supports_pie = yes ; then
296
 
        DAEMON_CFLAGS="-fPIE"
297
 
        DAEMON_LDFLAGS="-pie"
298
 
fi
299
 
rm -f pietest.c
300
 
AC_SUBST(DAEMON_CFLAGS)
301
 
AC_SUBST(DAEMON_LDFLAGS)
302
 
 
303
 
#
304
 
# Enable ability to access value in external env variable
305
 
#
306
 
AC_ARG_ENABLE(ext-env,
307
 
[  --disable-ext-env      disable search in environment for substitution variable],,
308
 
        enableval=yes)
309
 
if test x$enable_ext_env = xyes; then
310
 
        AC_DEFINE(ENABLE_EXT_ENV, 1, [leave this alone])
311
 
fi
312
 
 
313
 
#
314
 
# Disable use of locking when spawning mount command
315
 
#
316
 
AC_ARG_ENABLE(mount-locking,
317
 
[  --disable-mount-locking disable use of locking when spawning mount command],,
318
 
        enableval=yes)
319
 
if test x$enable_mount_locking = xyes -o x$enableval = xyes; then
320
 
        AC_DEFINE(ENABLE_MOUNT_LOCKING, 1, [Disable use of locking when spawning mount command])
321
 
fi
322
 
 
323
 
#
324
 
# Enable forced shutdown on USR1 signal (unlink umounts all mounts).
325
 
#
326
 
AC_ARG_ENABLE(forced-shutdown,
327
 
[  --enable-force-shutdown enable USR1 signal to force unlink umount of any
328
 
                          busy mounts during shutdown],,
329
 
        enableval=no)
330
 
if test x$enable_forced_shutdown = xyes -o x$enableval = xyes; then
331
 
        AC_DEFINE(ENABLE_FORCED_SHUTDOWN, 1, [Enable forced shutdown on USR1 signal])
332
 
fi
333
 
 
334
 
#
335
 
# Enable exit, ignoring busy mounts.
336
 
#
337
 
AC_ARG_ENABLE(ignore-busy,
338
 
[  --enable-ignore-busy   enable exit without umounting busy mounts during
339
 
                          shutdown],,
340
 
        enableval=no)
341
 
if test x$enable_ignore_busy_mounts = xyes -o x$enableval = xyes; then
342
 
        AC_DEFINE(ENABLE_IGNORE_BUSY_MOUNTS, 1, [Enable exit, ignoring busy mounts])
343
 
fi
344
 
 
345
 
#
346
 
# Write Makefile.conf and include/config.h
347
 
#
348
 
AC_CONFIG_HEADER(include/config.h)
349
 
AC_OUTPUT(Makefile.conf)
350
 
 
351
 
#
352
 
# Run make clean since we don't explicitly code the header file dependencies
353
 
#
354
 
AC_OUTPUT_COMMANDS([make clean])