~ubuntu-branches/ubuntu/maverick/bind9/maverick

« back to all changes in this revision

Viewing changes to contrib/dlz/config.dlz.in

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, LaMont Jones, Internet Software Consortium, Inc, localization folks
  • Date: 2008-08-02 14:20:20 UTC
  • mfrom: (1.2.1 upstream) (6.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080802142020-l1hon9jy8lbbjxmg
[LaMont Jones]

* default to using resolvconf if it is installed
* fix sonames and dependencies.  Closes: #149259, #492418
* Do not build-depend libcap2-dev on non-linux.  Closes: #493392
* drop unused query-loc manpage.  Closes: #492564
* lwresd: Deliver /etc/bind directory.  Closes: #490027
* fix query-source comment in default install

[Internet Software Consortium, Inc]

* 9.5.0-P2.  Closes: #492949

[localization folks]

* l10n: Spanish debconf translation.  Closes: #492425 (Ignacio Mondino)
* l10n: Swedish debconf templates.  Closes: #491369 (Martin Ågren)
* l10n: Japanese debconf translations.  Closes: #492048 (Hideki Yamane
  (Debian-JP))
* l10n: Finnish translation.  Closes: #490630 (Esko Arajärvi)
* l10n: Italian debconf translations.  Closes: #492587 (Alessandro Vietta)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2005  Internet Systems Consortium, Inc. ("ISC")
 
2
#
 
3
# Permission to use, copy, modify, and distribute this software for any
 
4
# purpose with or without fee is hereby granted, provided that the above
 
5
# copyright notice and this permission notice appear in all copies.
 
6
#
 
7
# THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
 
8
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 
9
# AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
 
10
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 
11
# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
 
12
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 
13
# PERFORMANCE OF THIS SOFTWARE.
 
14
 
 
15
#
 
16
# Shorthand.  Note quoting: DLZ_DRIVER_DIR expanded in Makefile, not here.
 
17
#
 
18
dlzdir='${DLZ_DRIVER_DIR}'
 
19
 
 
20
#
 
21
# Private autoconf macro to simplify configuring drivers:
 
22
#
 
23
#   DLZ_ADD_DRIVER(DEFINE, DRIVER, INCLUDES, LIBS)
 
24
#
 
25
# where:
 
26
#   DEFINE is FOO (to define -DDLZ_FOO)
 
27
#   DRIVER is dlz_foo_driver (sources without the .c)
 
28
#   INCLUDES is any necessary include definitions
 
29
#   LIBS is any necessary library definitions
 
30
#
 
31
AC_DEFUN(DLZ_ADD_DRIVER, [
 
32
        USE_DLZ="$USE_DLZ -DDLZ_$1"
 
33
        for i in $2
 
34
        do
 
35
                DLZ_DRIVER_SRCS="$DLZ_DRIVER_SRCS $dlzdir/$i.c"
 
36
                DLZ_DRIVER_OBJS="$DLZ_DRIVER_OBJS $i.$O"
 
37
        done
 
38
        if test -n "$3"
 
39
        then
 
40
                DLZ_DRIVER_INCLUDES="$DLZ_DRIVER_INCLUDES $3"
 
41
        fi
 
42
        if test -n "$4"
 
43
        then
 
44
                DLZ_DRIVER_LIBS="$DLZ_DRIVER_LIBS $4"
 
45
        fi
 
46
])
 
47
 
 
48
#
 
49
# Check for the various DLZ drivers
 
50
#
 
51
 
 
52
#
 
53
# Was --with-dlz-postgres specified?
 
54
#
 
55
 
 
56
AC_MSG_CHECKING(for Postgres DLZ driver)
 
57
AC_ARG_WITH(dlz_postgres,
 
58
[  --with-dlz-postgres[=PATH]   Build with Postgres DLZ driver [yes|no|path].
 
59
                               (Required to use Postgres with DLZ)],
 
60
    use_dlz_postgres="$withval", use_dlz_postgres="no")
 
61
 
 
62
if test "$use_dlz_postgres" = "yes"
 
63
then
 
64
        # User did not specify a path - guess it
 
65
        # Ask Postgres to tell us where it is
 
66
 
 
67
        AC_PATH_PROGS(PG_CONFIG, pg_config, [not found])
 
68
 
 
69
        if test "$PG_CONFIG" != "not found"
 
70
        then
 
71
                use_dlz_postgres=`$PG_CONFIG --includedir`
 
72
                use_dlz_postgres_lib=`$PG_CONFIG --libdir`
 
73
        fi
 
74
fi
 
75
 
 
76
if test "$use_dlz_postgres" = "yes"
 
77
then
 
78
        # User did not specify path and Postgres didn't say - guess it
 
79
 
 
80
        pgdirs="/usr /usr/local /usr/local/pgsql /usr/pkg"
 
81
        for d in $pgdirs
 
82
        do
 
83
                if test -f $d/include/libpq-fe.h
 
84
                then
 
85
                        use_dlz_postgres=$d/include
 
86
                        use_dlz_postgres_lib=$d/lib
 
87
                        break
 
88
                fi
 
89
        done
 
90
fi
 
91
 
 
92
if test "$use_dlz_postgres" = "yes"
 
93
then
 
94
        # Still no joy, give up
 
95
 
 
96
        AC_MSG_RESULT(not found)
 
97
        AC_MSG_ERROR(
 
98
[No pg_config and PostgreSQL was not found in any of $pgdirs; use --with-dlz-postgres=/path or put pg_config in your path])
 
99
fi
 
100
 
 
101
case "$use_dlz_postgres" in
 
102
        no)
 
103
                AC_MSG_RESULT(no)
 
104
                ;;
 
105
        *)
 
106
                DLZ_ADD_DRIVER(POSTGRES, dlz_postgres_driver,
 
107
                                [-I$use_dlz_postgres],
 
108
                                [-L$use_dlz_postgres_lib -lpq])
 
109
 
 
110
                AC_MSG_RESULT(
 
111
[using PostgreSQL from $use_dlz_postgres_lib and $use_dlz_postgres])
 
112
                ;;
 
113
esac
 
114
 
 
115
 
 
116
#
 
117
# Was --with-dlz-mysql specified?
 
118
#
 
119
 
 
120
AC_MSG_CHECKING(for MySQL DLZ driver)
 
121
AC_ARG_WITH(dlz_mysql,
 
122
[  --with-dlz-mysql[=PATH]   Build with MySQL DLZ driver [yes|no|path].
 
123
                               (Required to use MySQL with DLZ)],
 
124
    use_dlz_mysql="$withval", use_dlz_mysql="no")
 
125
 
 
126
if test "$use_dlz_mysql" = "yes"
 
127
then
 
128
        # User did not specify a path - guess it
 
129
        mysqldirs="/usr /usr/local /usr/local/mysql /usr/pkg"
 
130
        for d in $mysqldirs
 
131
        do
 
132
                if test -f $d/include/mysql/mysql.h
 
133
                then
 
134
                        use_dlz_mysql=$d
 
135
                        break
 
136
                fi
 
137
        done
 
138
fi
 
139
 
 
140
if test "$use_dlz_mysql" = "yes"
 
141
then
 
142
        AC_MSG_RESULT(not found)
 
143
        AC_MSG_ERROR(
 
144
[MySQL was not found in any of $mysqldirs; use --with-dlz-mysql=/path])
 
145
fi
 
146
 
 
147
case "$use_dlz_mysql" in
 
148
        no)
 
149
                AC_MSG_RESULT(no)
 
150
                ;;
 
151
        *)
 
152
                DLZ_ADD_DRIVER(MYSQL, dlz_mysql_driver,
 
153
                                [-I$use_dlz_mysql/include/mysql],
 
154
                                [-L$use_dlz_mysql/lib/mysql -lmysqlclient -lz -lcrypt -lm])
 
155
 
 
156
                AC_MSG_RESULT(
 
157
[using mysql from $use_dlz_mysql/lib/mysql and $use_dlz_mysql/include/mysql])
 
158
                ;;
 
159
esac
 
160
 
 
161
 
 
162
#
 
163
# Was --with-dlz-bdb specified?
 
164
#
 
165
 
 
166
AC_MSG_CHECKING(for Berkeley DB DLZ driver)
 
167
AC_ARG_WITH(dlz_bdb,
 
168
[  --with-dlz-bdb[=PATH]   Build with Berkeley DB DLZ driver [yes|no|path].
 
169
                               (Required to use Berkeley DB with DLZ)],
 
170
    use_dlz_bdb="$withval", use_dlz_bdb="no")
 
171
 
 
172
case "$use_dlz_bdb" in
 
173
        no)
 
174
                AC_MSG_RESULT(no)
 
175
                ;;
 
176
        *)
 
177
                if test "$use_dlz_bdb" = "yes"
 
178
                then
 
179
                        # User did not specify a path - guess directories
 
180
                        bdbdirs="/usr/local /usr/pkg /usr"
 
181
                elif test -d "$use_dlz_bdb"
 
182
                then
 
183
                        # User specified directory and it exists
 
184
                        bdbdirs="$use_dlz_bdb"
 
185
                else
 
186
                        AC_MSG_RESULT(not found)
 
187
                        AC_MSG_ERROR([path $use_dlz_bdb does not exist])
 
188
                        bdbdirs=""
 
189
                fi
 
190
 
 
191
                # Use path we were given or guessed.  This is insanely
 
192
                # complicated because we have to search for a bunch of
 
193
                # platform-specific variations and have to check
 
194
                # separately for include and library directories.
 
195
 
 
196
                # Set both to yes, so we can check them later
 
197
                dlz_bdb_inc="yes"
 
198
                dlz_bdb_libs="yes"
 
199
 
 
200
                for dd in $bdbdirs
 
201
                do
 
202
                        # Skip nonexistant directories
 
203
                        if test ! -d "$dd"
 
204
                        then
 
205
                                continue
 
206
                        fi
 
207
 
 
208
                        # Check other locations for includes.
 
209
                        # Order is important (sigh).
 
210
 
 
211
                        bdb_incdirs="/ /db42/ /db41/ /db4/ /db/"
 
212
                        for d in $bdb_incdirs
 
213
                        do
 
214
                                if test -f "$dd/include${d}db.h"
 
215
                                then
 
216
                                        dlz_bdb_inc="-I$dd/include${d}"
 
217
                                        break
 
218
                                fi
 
219
                        done
 
220
 
 
221
                        # Give up on this directory if we couldn't
 
222
                        # find the include subdir
 
223
 
 
224
                        if test "$dlz_bdb_inc" = "yes"
 
225
                        then
 
226
                                continue
 
227
                        fi
 
228
 
 
229
                        # Look for libname other than libdb.so.
 
230
                        # Order is important (sigh).
 
231
 
 
232
                        bdb_libnames="db-4 db42 db-4.2 db41 db-4.1 db"
 
233
                        for d in $bdb_libnames
 
234
                        do
 
235
                                if test -f "$dd/lib/lib${d}.so"
 
236
                                then
 
237
                                        if test "$dd" != "/usr"
 
238
                                        then
 
239
                                                dlz_bdb_libs="-L${dd}/lib "
 
240
                                        else
 
241
                                                dlz_bdb_libs=""
 
242
                                        fi
 
243
                                        dlz_bdb_libs="${dlz_bdb_libs}-l${d}"
 
244
                                        break
 
245
                                fi
 
246
                        done
 
247
 
 
248
                        # If we found both incdir and lib, we're done
 
249
                        if test "$dlz_bdb_libs" != "yes"
 
250
                        then
 
251
                                break
 
252
                        fi
 
253
 
 
254
                        # Otherwise, we're starting over
 
255
 
 
256
                        dlz_bdb_inc="yes"
 
257
                        dlz_bdb_libs="yes"
 
258
                done
 
259
                
 
260
                # Done searching, now make sure we got everything.
 
261
 
 
262
                if test "$dlz_bdb_inc" = "yes"
 
263
                then
 
264
                        AC_MSG_RESULT(not found)
 
265
                        AC_MSG_ERROR([could not find Berkeley DB include directory])
 
266
                fi
 
267
 
 
268
                if test "$dlz_bdb_libs" = "yes"
 
269
                then
 
270
                        AC_MSG_RESULT(not found)
 
271
                        AC_MSG_ERROR([could not find Berkeley DB library])
 
272
                fi
 
273
 
 
274
                DLZ_ADD_DRIVER(BDB, dlz_bdb_driver dlz_bdbhpt_driver,
 
275
                               [$dlz_bdb_inc], [$dlz_bdb_libs])
 
276
 
 
277
                AC_MSG_RESULT([using Berkeley DB: $dlz_bdb_inc $dlz_bdb_libs])
 
278
 
 
279
                AC_CONFIG_FILES([contrib/dlz/bin/dlzbdb/Makefile])
 
280
                ;;
 
281
esac
 
282
 
 
283
 
 
284
#
 
285
# Was --with-dlz-filesystem specified?
 
286
#
 
287
 
 
288
AC_MSG_CHECKING(for file system DLZ driver)
 
289
AC_ARG_WITH(dlz_filesystem,
 
290
[  --with-dlz-filesystem[=PATH]   Build with filesystem DLZ driver [yes|no].
 
291
                               (Required to use file system driver with DLZ)],
 
292
    use_dlz_filesystem="$withval", use_dlz_filesystem="no")
 
293
 
 
294
case "$use_dlz_filesystem" in
 
295
        no)
 
296
                AC_MSG_RESULT(no)
 
297
                ;;
 
298
        *)
 
299
                DLZ_ADD_DRIVER(FILESYSTEM, dlz_filesystem_driver)
 
300
 
 
301
                AC_MSG_RESULT(yes)
 
302
                ;;
 
303
esac
 
304
 
 
305
 
 
306
#
 
307
# Was --with-dlz-ldap specified?
 
308
#
 
309
 
 
310
AC_MSG_CHECKING(for LDAP DLZ driver)
 
311
AC_ARG_WITH(dlz_ldap,
 
312
[  --with-dlz-ldap[=PATH]   Build with LDAP DLZ driver [yes|no|path].
 
313
                               (Required to use LDAP with DLZ)],
 
314
    use_dlz_ldap="$withval", use_dlz_ldap="no")
 
315
 
 
316
if test "$use_dlz_ldap" = "yes"
 
317
then
 
318
        # User did not specify a path - guess it
 
319
        ldapdirs="/usr /usr/local /usr/pkg"
 
320
        for d in $ldapdirs
 
321
        do
 
322
                if test -f $d/include/ldap.h
 
323
                then
 
324
                        use_dlz_ldap=$d
 
325
                        break
 
326
                fi
 
327
        done
 
328
fi
 
329
 
 
330
if test "$use_dlz_ldap" = "yes"
 
331
then
 
332
        AC_MSG_RESULT(not found)
 
333
        AC_MSG_ERROR(
 
334
[LDAP headers were not found in any of $ldapdirs; use --with-dlz-ldap=/path])
 
335
fi
 
336
 
 
337
case "$use_dlz_ldap" in
 
338
        no)
 
339
                AC_MSG_RESULT(no)
 
340
                ;;
 
341
        *)
 
342
                DLZ_ADD_DRIVER(LDAP, dlz_ldap_driver,
 
343
                                [-I$use_dlz_ldap/include],
 
344
                                [-L$use_dlz_ldap/lib -lldap -llber])
 
345
 
 
346
                AC_MSG_RESULT(
 
347
[using LDAP from $use_dlz_ldap/lib and $use_dlz_ldap/include])
 
348
                ;;
 
349
esac
 
350
 
 
351
 
 
352
#
 
353
# Was --with-dlz-odbc specified?
 
354
#
 
355
 
 
356
AC_MSG_CHECKING(for ODBC DLZ driver)
 
357
AC_ARG_WITH(dlz_odbc,
 
358
[  --with-dlz-odbc[=PATH]   Build with ODBC DLZ driver [yes|no|path].
 
359
                               (Required to use ODBC with DLZ)],
 
360
    use_dlz_odbc="$withval", use_dlz_odbc="no")
 
361
 
 
362
if test "$use_dlz_odbc" = "yes"
 
363
then
 
364
        # User did not specify a path - guess it
 
365
        odbcdirs="/usr /usr/local /usr/pkg"
 
366
        for d in $odbcdirs
 
367
        do
 
368
                if test -f $d/include/sql.h -a -f $d/lib/libodbc.a
 
369
                then
 
370
                        use_dlz_odbc=$d
 
371
                        break
 
372
                fi
 
373
        done
 
374
fi
 
375
 
 
376
case "$use_dlz_odbc" in
 
377
        no)
 
378
                AC_MSG_RESULT(no)
 
379
                ;;
 
380
        yes)
 
381
                AC_MSG_RESULT(not found)
 
382
                AC_MSG_ERROR(
 
383
[ODBC headers were not found in any of $odbcdirs; use --with-dlz-odbc=/path])
 
384
                ;;
 
385
        *)
 
386
                DLZ_ADD_DRIVER(ODBC, dlz_odbc_driver,
 
387
                                [-I$use_dlz_odbc/include],
 
388
                                [-L$use_dlz_odbc/lib -lodbc])
 
389
 
 
390
                AC_MSG_RESULT([using ODBC from $use_dlz_odbc])
 
391
                ;;
 
392
esac
 
393
 
 
394
 
 
395
#
 
396
# Was --with-dlz-stub specified?
 
397
#
 
398
 
 
399
AC_MSG_CHECKING(for stub DLZ driver)
 
400
AC_ARG_WITH(dlz_stub,
 
401
[  --with-dlz-stub[=PATH]   Build with stub DLZ driver [yes|no].
 
402
                               (Required to use stub driver with DLZ)],
 
403
    use_dlz_stub="$withval", use_dlz_stub="no")
 
404
 
 
405
case "$use_dlz_stub" in
 
406
        no)
 
407
                AC_MSG_RESULT(no)
 
408
                ;;
 
409
        *)
 
410
 
 
411
                DLZ_ADD_DRIVER(STUB, dlz_stub_driver)
 
412
 
 
413
                AC_MSG_RESULT(yes)
 
414
                ;;
 
415
esac
 
416
 
 
417
 
 
418
# Add any additional DLZ drivers here.
 
419
 
 
420
#
 
421
# Finally, some generic stuff that applies to all drivers, assuming
 
422
# we're compiling DLZ at all.
 
423
#
 
424
if test -n "$USE_DLZ"
 
425
then
 
426
        #
 
427
        # Where to find DLZ driver header files.
 
428
        #
 
429
        DLZ_DRIVER_INCLUDES="-I$dlzdir/include $DLZ_DRIVER_INCLUDES"
 
430
 
 
431
        #
 
432
        # Initialization and shutdown wrappers, helper functions.
 
433
        #
 
434
        DLZ_DRIVER_SRCS="$dlzdir/dlz_drivers.c $dlzdir/sdlz_helper.c $DLZ_DRIVER_SRCS"
 
435
        DLZ_DRIVER_OBJS="dlz_drivers.$O sdlz_helper.$O $DLZ_DRIVER_OBJS"
 
436
fi