root/tags/pdns-3.0.1/configure.ac @ 2333

Revision 2333, 19.1 KB (checked in by ahu, 16 months ago)

make it 3.0.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to author date id revision
Line 
1dnl intro
2AC_INIT(pdns/receiver.cc)
3AM_INIT_AUTOMAKE(pdns, 3.0.1)
4AC_CANONICAL_HOST
5AM_CONFIG_HEADER(config.h)
6AC_C_BIGENDIAN
7AC_PREREQ(2.52)
8CXXFLAGS="$CXXFLAGS -Wall -O2"
9
10AC_PREFIX_DEFAULT(/usr/local)
11AC_PROG_CC
12AC_PROG_CXX
13AC_PROG_YACC
14AM_PROG_LEX
15AC_PROG_INSTALL
16AC_PROG_MAKE_SET
17AC_PROG_LIBTOOL
18AC_LANG_CPLUSPLUS
19
20BOOST_REQUIRE([1.34])
21BOOST_FOREACH
22#BOOST_FILESYSTEM([mt])
23BOOST_PROGRAM_OPTIONS([mt])
24BOOST_SERIALIZATION([mt])
25#BOOST_SYSTEM([mt])
26
27dnl Check for lua
28AC_MSG_CHECKING(if with lua)
29AC_ARG_WITH(lua, AC_HELP_STRING([--with-lua],[lua]), WITH_LUA=$withval],[WITH_LUA=yes])
30
31AC_MSG_RESULT($WITH_LUA)
32if test "$WITH_LUA" != "no"; then
33 # try pkgconfig
34 if test "$WITH_LUA" = "yes"; then
35      LUAPC=lua
36 else
37      LUAPC=$WITH_LUA
38 fi
39 PKG_CHECK_MODULES(LUA, $LUAPC >= 5.1, [
40        AC_DEFINE([HAVE_LUA], [1], [liblua])
41        AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
42        ],[
43        PKG_CHECK_MODULES(LUA, lua5.1 >= 5.1, [
44                AC_DEFINE([HAVE_LUA], [1], [liblua])
45                AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
46        ],[
47        PKG_CHECK_MODULES(LUA, lua-5.1 >= 5.1, [
48                AC_DEFINE([HAVE_LUA], [1], [liblua])
49                AC_DEFINE([HAVE_LUA_H], [1], [lua.h])
50                ])
51                ])
52        ])
53 AC_SUBST(LUA_CFLAGS)
54 AC_SUBST(LUA_LIBS)
55fi
56                                         
57dnl Checks for header files.
58AC_HEADER_STDC
59AC_CHECK_HEADERS(fcntl.h  getopt.h limits.h strings.h sys/time.h syslog.h unistd.h)
60
61dnl Checks for typedefs, structures, and compiler characteristics.
62AC_TYPE_SIZE_T
63AC_HEADER_TIME
64AC_STRUCT_TM
65
66dnl Checks for library functions.
67AC_TYPE_SIGNAL
68AC_CHECK_FUNCS(gethostname gettimeofday mkdir mktime select socket strerror)
69
70# Check for libdl
71
72LIBS="$LIBS -lz"
73
74my_save_LIBS="$LIBS"
75LIBS=""
76AC_CHECK_LIB(dl,dlopen)
77LIBDL=$LIBS
78LIBS="$my_save_LIBS"
79AC_SUBST(LIBDL)
80
81AC_MSG_CHECKING([for RTLD_NOW]);
82ac_save_LIBS="$LIBS"
83LIBS="$LIBS $LIBDL"
84AC_TRY_LINK(
85[#include <dlfcn.h>],
86[ (void) dlopen("",RTLD_NOW); ],
87has_RTLD_NOW=yes, has_RTLD_NOW=no)
88AC_MSG_RESULT([$has_RTLD_NOW])
89if test "$has_RTLD_NOW" = "no"
90then
91        AC_DEFINE(NEED_RTLD_NOW,,[If host OS misses RTLD_NOW])
92fi
93LIBS=$ac_save_LIBS
94
95DYNLINKFLAGS=""
96THREADFLAGS=""
97
98case "$host_os" in
99solaris2.10)
100        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
101        LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread -lrt $LIBS"
102        CXXFLAGS="-D_REENTRANT $CXXFLAGS"
103        ;;
104
105solaris2.8 | solaris2.9 )
106        AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
107        AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
108        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
109        LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
110        CXXFLAGS="-D_REENTRANT $CXXFLAGS"
111        ;;
112solaris2.6 | solaris2.7)
113        AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
114        AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
115        LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
116        CXXFLAGS="-D_REENTRANT $CXXFLAGS"
117        ;;
118linux*)
119        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
120        DYNLINKFLAGS="-rdynamic"
121        LDFLAGS="$LDFLAGS"
122        THREADFLAGS="-pthread"
123        CXXFLAGS="-D_GNU_SOURCE $CXXFLAGS"
124        ;;
125openbsd*)
126        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
127        DYNLINKFLAGS="-rdynamic"
128        LDFLAGS="-lc_r $LDFLAGS"
129        CXXFLAGS="-pthread $CXXFLAGS"
130        ;;
131*)
132        AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
133        DYNLINKFLAGS="-rdynamic"
134        LDFLAGS="-pthread $LDFLAGS"
135        CXXFLAGS="-pthread $CXXFLAGS"
136        ;;
137esac
138
139AC_SUBST(THREADFLAGS)
140
141AC_SUBST(DYNLINKFLAGS)
142
143AC_MSG_CHECKING(whether we will be doing verbose logging)
144AC_ARG_ENABLE(verbose-logging,
145 [  --enable-verbose-logging    Do verbose logging],enable_verbose_logging=yes ,enable_verbose_logging=no)
146
147if test $enable_verbose_logging = yes; then AC_DEFINE(VERBOSELOG, 1, [If verbose logging should be enabled])
148fi
149AC_MSG_RESULT($enable_verbose_logging)
150
151AC_MSG_CHECKING(whether we will be linking in Botan 1.9)
152AC_ARG_ENABLE(botan1.9,
153 [  --enable-botan1.9   Use Botan 1.9],enable_botan19=yes, enable_botan19=no)
154AC_MSG_RESULT($enable_botan19)
155AM_CONDITIONAL(BOTAN19,test x"$enable_botan19" = "xyes")
156
157AC_MSG_CHECKING(whether we will be linking in Botan 1.8)
158AC_ARG_ENABLE(botan1.8,
159 [  --enable-botan1.8   Use Botan 1.8],enable_botan18=yes, enable_botan18=no)
160AC_MSG_RESULT($enable_botan18)
161AM_CONDITIONAL(BOTAN18,test x"$enable_botan18" = "xyes")
162
163AC_MSG_CHECKING(whether we will be linking in Crypto++)
164AC_ARG_ENABLE(cryptopp,
165 [  --enable-cryptopp   Use Crypto++],enable_cryptopp=yes, enable_cryptopp=no)
166AC_MSG_RESULT($enable_cryptopp)
167AM_CONDITIONAL(CRYPTOPP,test x"$enable_cryptopp" = "xyes")
168
169
170AC_MSG_CHECKING(whether we should build static binaries)
171
172AC_ARG_ENABLE(static-binaries,
173        [  --enable-static-binaries     Build static binaries],
174     [case "${enableval}" in
175       yes) static=true ;;
176       no)  static=false ;;
177       *) AC_MSG_ERROR(bad value ${enableval} for --enable-static-binaries) ;;
178     esac],[debug=false])
179AC_MSG_RESULT($static)
180
181AM_CONDITIONAL(ALLSTATIC, test x$static = xtrue)
182
183if test x$static = xtrue;
184then
185        LDFLAGS="-all-static $LDFLAGS"
186fi
187
188
189
190modules="gmysql geo"
191AC_ARG_WITH(modules, [  --with-modules Which backends to compile with ],
192[
193        modules="$withval" 
194])
195
196dynmodules="pipe"
197AC_ARG_WITH(dynmodules, [  --with-dynmodules Which backends to build for dynamic loading ],
198[
199        dynmodules="$withval" 
200])
201
202
203
204AC_SUBST(socketdir)
205socketdir="/var/run"
206AC_ARG_WITH(socketdir, [  --with-socketdir Where the controlsocket lives ],
207[
208        socketdir="$withval" 
209])
210
211AC_SUBST(moduledirs)
212AC_SUBST(moduleobjects)
213AC_SUBST(modulelibs)
214
215AC_MSG_CHECKING(whether we will be building the server)
216AC_ARG_ENABLE(pdns-server,
217 [  --enable-pdns_server        If we should build the server],
218        enable_pdns_server=$enableval,
219        enable_pdns_server=yes)
220
221AC_MSG_RESULT($enable_pdns_server)
222
223if test x"$enable_pdns_server" = "xyes"
224then
225        programdescend=pdns
226fi
227
228AC_SUBST(programdescend)
229
230AC_ARG_ENABLE(gcc-skip-locking,
231 [ --enable-gcc-skip-locking    If we should forcefully skip gcc locking],
232        AC_DEFINE(GCC_SKIP_LOCKING,,[Skip gcc locking]),
233 )
234
235AC_MSG_CHECKING(whether we will be building the recursor)
236AC_ARG_ENABLE(recursor,
237 [  --enable-recursor   If we should build the recursor],
238        enable_recursor=$enableval,
239        enable_recursor=no )
240
241AC_MSG_RESULT($enable_recursor)
242AM_CONDITIONAL(RECURSOR,test x"$enable_recursor" = "xyes")
243
244for a in $modules $dynmodules
245do
246        case "$a" in
247                mysql )
248                        needmysql=yes
249                ;;
250                gmysql )
251                        needmysql=yes
252                ;;
253                mydns )
254                        needmysql=yes
255                ;;
256                gpgsql )
257                        needpgsql=yes
258                ;;
259                gsqlite )
260                        needsqlite=yes
261                ;;
262                gsqlite3 )
263                        needsqlite3=yes
264                ;;
265                pdns )
266                        needmysql=yes
267                ;;
268                ldap)
269                        AC_CHECK_HEADERS([ldap.h], , [AC_MSG_ERROR([ldap header (ldap.h) not found])])
270                        AC_CHECK_HEADERS([lber.h], , [AC_MSG_ERROR([ldap header (lber.h) not found])])
271                        AC_SUBST([LIBLDAP])
272                        AC_CHECK_LIB(
273                                [ldap_r], [ldap_set_option],
274                                [AC_DEFINE([HAVE_LIBLDAP_R], 1, [Have -lldap_r]) LIBLDAP="ldap_r"],
275                                [AC_CHECK_LIB(
276                                        [ldap], [ldap_set_option],
277                                        [AC_DEFINE([HAVE_LIBLDAP], 1, [Have -lldap]) LIBLDAP="ldap"],
278                                        [AC_MSG_ERROR([ldap library (libldap) not found])]
279                                )]
280                        )
281                        AC_CHECK_LIB(
282                                [$LIBLDAP], [ldap_initialize],
283                                [AC_DEFINE([HAVE_LDAP_INITIALIZE], 1, [Define to 1 if you have ldap_initialize])]
284                        )
285                        AC_CHECK_LIB(
286                                [$LIBLDAP], [ldap_sasl_bind],
287                                [AC_DEFINE([HAVE_LDAP_SASL_BIND], 1, [Define to 1 if you have ldap_sasl_bind])]
288                        )
289                ;;
290                godbc )
291                        needunixodbc=yes
292                ;;
293                opendbx)
294                        AC_CHECK_HEADERS([odbx.h], , [AC_MSG_ERROR([opendbx header (odbx.h) not found])])
295                        AC_SUBST([LIBOPENDBX])
296                        AC_CHECK_LIB(
297                                [opendbx], [odbx_init],
298                                [AC_DEFINE([HAVE_LIBOPENDBX], 1, [Have -lopendbx]) LIBOPENDBX="opendbx"]
299                        )
300                ;;
301        esac
302done
303
304
305if test "$needmysql"
306then
307        AC_ARG_WITH(mysql,
308            [  --with-mysql=<path>     root directory path of MySQL installation],
309            [MYSQL_lib_check="$withval/lib/mysql $with_mysql/lib"
310        MYSQL_inc_check="$withval/include/mysql"],
311            [MYSQL_lib_check="/usr/local/mysql/lib/mysql /usr/local/lib/mysql /opt/mysql/lib/mysql \
312                /usr/lib/mysql /usr/lib64/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib /usr/lib \
313                /usr/sfw/lib/"
314        MYSQL_inc_check="/usr/local/mysql/include/mysql /usr/local/include/mysql \
315                /opt/mysql/include/mysql /opt/mysql/include /usr/include/mysql /usr/sfw/include/mysql"])
316                AC_ARG_WITH(mysql-lib,
317            [  --with-mysql-lib=<path> directory path of MySQL library installation],
318            [MYSQL_lib_check="$withval/lib/mysql $withval/mysql $withval"])
319                AC_ARG_WITH(mysql-includes,
320            [  --with-mysql-includes=<path>
321                         directory path of MySQL header installation],
322            [MYSQL_inc_check="$withval/include/mysql $withval/mysql $withval"])
323                AC_MSG_CHECKING([for MySQL library directory])
324        MYSQL_libdir=
325        for m in $MYSQL_lib_check; do
326                if test -d "$m" && \
327                   (test -f "$m/libmysqlclient.so" || test -f "$m/libmysqlclient.a")
328                then
329                        MYSQL_libdir=$m
330                        break
331                fi
332        done
333                if test -z "$MYSQL_libdir"; then
334                AC_MSG_ERROR([Didn't find the mysql library dir in '$MYSQL_lib_check'])
335        fi
336        case "$MYSQL_libdir" in
337                 /usr/lib ) MYSQL_lib="" ;;
338          /* ) MYSQL_lib=-L$MYSQL_libdir; LDFLAGS="$MYSQL_lib $LDFLAGS";;
339          * )  AC_MSG_ERROR([The MySQL library directory ($MYSQL_libdir) must be an absolute path.]) ;;
340        esac
341       
342        AC_SUBST(MYSQL_lib)
343       
344        AC_MSG_RESULT([$MYSQL_libdir])
345                AC_MSG_CHECKING([for MySQL include directory])
346        MYSQL_incdir=
347        for m in $MYSQL_inc_check; do
348                if test -d "$m" && test -f "$m/mysql.h"
349                then
350                        MYSQL_incdir=$m
351                        break
352                fi
353        done
354                if test -z "$MYSQL_incdir"; then
355                AC_MSG_ERROR([Didn't find the mysql include dir in '$MYSQL_inc_check'])
356        fi
357       
358        case "$MYSQL_incdir" in
359          /* ) ;;
360          * )  AC_MSG_ERROR([The MySQL include directory ($MYSQL_incdir) must be an absolute path.]) ;;
361        esac
362       
363        AC_SUBST(MYSQL_incdir)
364        AC_MSG_RESULT([$MYSQL_incdir])
365#       LIBS="$LIBS -lmysqlclient"
366fi
367
368
369
370if test "$needpgsql"
371then
372        AC_ARG_WITH(pgsql,
373            [  --with-pgsql=<path>     root directory path of PgSQL installation],
374            [PGSQL_lib_check="$withval/lib/pgsql $with_pgsql/lib"
375        PGSQL_inc_check="$withval/include/pgsql"],
376            [PGSQL_lib_check="/usr/local/pgsql/lib/pgsql /usr/local/lib/pgsql /opt/pgsql/lib/pgsql /usr/lib/pgsql /usr/local/pgsql/lib /usr/local/lib /opt/pgsql/lib /usr/lib /usr/lib64"
377        PGSQL_inc_check="/usr/local/pgsql/include/pgsql /usr/include /usr/local/include/postgresql/ /usr/local/include /opt/pgsql/include/pgsql /opt/pgsql/include /usr/include/pgsql/ /usr/include/postgresql"])
378                AC_ARG_WITH(pgsql-lib,
379            [  --with-pgsql-lib=<path> directory path of PgSQL library installation],
380            [PGSQL_lib_check="$withval/lib/pgsql $withval/pgsql $withval"])
381                AC_ARG_WITH(pgsql-includes,
382            [  --with-pgsql-includes=<path>
383                         directory path of PgSQL header installation],
384            [PGSQL_inc_check="$withval/include/pgsql $withval/pgsql $withval"])
385                AC_MSG_CHECKING([for PgSQL library directory])
386        PGSQL_libdir=
387        for m in $PGSQL_lib_check; do
388                if test -d "$m" && \
389                   (test -f "$m/libpq.a" || test -f "$m/libpq.so")
390                then
391                        PGSQL_libdir=$m
392                        break
393                fi
394        done
395                if test -z "$PGSQL_libdir"; then
396                AC_MSG_ERROR([Didn't find the pgsql library dir in '$PGSQL_lib_check'])
397        fi
398        case "$PGSQL_libdir" in
399          /usr/lib ) PGSQL_lib="" ;;
400          /usr/lib64 ) PGSQL_lib="" ;;
401          /* ) PGSQL_lib="-L$PGSQL_libdir -Wl,-rpath,$PGSQL_libdir"
402               LDFLAGS="$PGSQL_lib $LDFLAGS"
403               ;;
404          * )  AC_MSG_ERROR([The PgSQL library directory ($PGSQL_libdir) must be an absolute path.]) ;;
405        esac
406
407        AC_SUBST(PGSQL_lib)
408        AC_MSG_RESULT([$PGSQL_libdir])
409                AC_MSG_CHECKING([for PgSQL include directory])
410        PGSQL_incdir=
411        for m in $PGSQL_inc_check; do
412                if test -d "$m" && test -f "$m/libpq-fe.h"
413                then
414                        PGSQL_incdir=$m
415                        break
416                fi
417        done
418                if test -z "$PGSQL_incdir"; then
419                AC_MSG_ERROR([Didn't find the PgSQL include dir in '$PGSQL_inc_check'])
420        fi
421        case "$PGSQL_incdir" in
422          /* ) ;;
423          * )  AC_MSG_ERROR([The PgSQL include directory ($PGSQL_incdir) must be an absolute path.]) ;;
424        esac
425        AC_SUBST(PGSQL_incdir)
426        AC_MSG_RESULT([$PGSQL_incdir])
427
428#       LIBS="$LIBS -lpq++ -lpq -lssl -lcrypt -lcrypto"
429fi
430
431
432if test "$needsqlite"
433then
434
435        AC_ARG_WITH(sqlite,
436            [  --with-sqlite=<path>     root directory path of SQLite installation],
437            [SQLITE_lib_check="$withval/lib/sqlite $with_sqlite/lib"
438        SQLITE_inc_check="$withval/include/sqlite"],
439            [SQLITE_lib_check="/usr/local/sqlite/lib/sqlite /usr/local/lib/sqlite /opt/pgsql/lib/sqlite /usr/lib/sqlite /usr/local/sqlite/lib /usr/local/lib /opt/sqlite/lib /usr/lib /usr/lib64"
440        SQLITE_inc_check="/usr/local/sqlite/include/sqlite /usr/local/include/sqlite/ /usr/local/include /opt/sqlite/include/sqlite /opt/sqlite/include /usr/include/ /usr/include/sqlite"])
441                AC_ARG_WITH(sqlite-lib,
442            [  --with-sqlite-lib=<path> directory path of SQLite library installation],
443            [SQLITE_lib_check="$withval/lib/sqlite $withval/sqlite $withval"])
444                AC_ARG_WITH(sqlite-includes,
445            [  --with-sqlite-includes=<path>
446                         directory path of SQLite header installation],
447            [SQLITE_inc_check="$withval/include/sqlite $withval/sqlite $withval"])
448                AC_MSG_CHECKING([for SQLite library directory])
449        SQLITE_libdir=
450        for m in $SQLITE_lib_check; do
451                if test -d "$m" && \
452                   (test -f "$m/libsqlite.so" || test -f "$m/libsqlite.a")
453                then
454                        SQLITE_libdir=$m
455                        break
456                fi
457        done
458                if test -z "$SQLITE_libdir"; then
459                AC_MSG_ERROR([Didn't find the sqlite library dir in '$SQLITE_lib_check'])
460        fi
461        case "$SQLITE_libdir" in
462          /usr/lib ) SQLITE_lib="" ;;
463          /usr/lib64 ) SQLITE_lib="" ;;
464          /* ) SQLITE_lib="-L$SQLITE_libdir -Wl,-rpath,$SQLITE_libdir"
465               LDFLAGS="$SQLITE_lib $LDFLAGS"
466               ;;
467          * )  AC_MSG_ERROR([The SQLite library directory ($SQLITE_libdir) must be an absolute path.]) ;;
468        esac
469
470        AC_SUBST(SQLITE_lib)
471        AC_MSG_RESULT([$SQLITE_libdir])
472                AC_MSG_CHECKING([for SQLite include directory])
473        SQLITE_incdir=
474        for m in $SQLITE_inc_check; do
475                if test -d "$m" && test -f "$m/sqlite.h"
476                then
477                        SQLITE_incdir=$m
478                        break
479                fi
480        done
481                if test -z "$SQLITE_incdir"; then
482                AC_MSG_ERROR([Didn't find the SQLite include dir in '$SQLITE_inc_check'])
483        fi
484        case "$SQLITE_incdir" in
485          /* ) ;;
486          * )  AC_MSG_ERROR([The SQLite include directory ($SQLITE_incdir) must be an absolute path.]) ;;
487        esac
488        AC_SUBST(SQLITE_incdir)
489        AC_MSG_RESULT([$SQLITE_incdir])
490
491#       LIBS="$LIBS -lsqlite"
492fi
493
494if test "$needsqlite3"
495then
496        PKG_CHECK_MODULES(SQLITE3, sqlite3, HAVE_SQLITE=yes, AC_MSG_ERROR([+Could not find sqlite3]))
497        AC_SUBST(SQLITE3_LIBS)
498        AC_SUBST(SQLITE3_CFLAGS)
499fi
500
501if test "$needunixodbc"
502then
503        AC_ARG_WITH(unixodbc,
504            [  --with-unixodbc=<path>     root directory path of unixodbc installation],
505            [UNIXODBC_lib_check="$withval/lib/unixodbc $with_unixodbc/lib $withval/lib"
506             UNIXODBC_inc_check="$withval/include/unixodbc"],
507            [UNIXODBC_lib_check="/usr/local/unixodbc/lib/unixodbc /usr/local/lib/unixodbc /usr/lib/unixodbc /usr/local/unixodbc/lib /usr/local/lib /opt/unixodbc/lib /usr/lib"
508             UNIXODBC_inc_check="/usr/local/unixodbc/include/unixodbc /usr/local/include/unixodbc/ /usr/local/include /opt/unixodbc/include/unixodbc /opt/unixodbc/include /usr/include/ /usr/include/unixodbc"])
509        AC_ARG_WITH(unixodbc-lib,
510            [  --with-unixodbc-lib=<path> directory path of unixodbc library installation],
511            [UNIXODBC_lib_check="$withval/lib/unixodbc $withval/unixodbc $withval"])
512        AC_ARG_WITH(unixodbc-includes,
513            [  --with-unixodbc-includes=<path> directory path of unixodbc header installation],
514            [UNIXODBC_inc_check="$withval/include $withval/include/unixodbc $withval/unixodbc $withval"])
515        AC_MSG_CHECKING([for SQLite3 library directory])
516        UNIXODBC_libdir=
517        for m in $UNIXODBC_lib_check; do
518                if test -d "$m" && \
519                   (test -f "$m/libodbc.so" || test -f "$m/libodbc.a")
520                then
521                        UNIXODBC_libdir=$m
522                        break
523                fi
524        done
525                if test -z "$UNIXODBC_libdir"; then
526                AC_MSG_ERROR([Didn't find the unixodbc library dir in '$UNIXODBC_lib_check'])
527        fi
528        case "$UNIXODBC_libdir" in
529           /usr/lib ) UNIXODBC_lib="" ;;
530          /* ) UNIXODBC_lib="-L$UNIXODBC_libdir -Wl,-rpath,$UNIXODBC_libdir"
531               LDFLAGS="$UNIXODBC_lib $LDFLAGS"
532               ;;
533          * )  AC_MSG_ERROR([The unixodbc library directory ($UNIXODBC_libdir) must be an absolute path.]) ;;
534        esac
535
536        AC_SUBST(UNIXODBC_lib)
537        AC_MSG_RESULT([$UNIXODBC_libdir])
538        AC_MSG_CHECKING([for unixodbc include directory])
539        UNIXODBC_incdir=
540        for m in $UNIXODBC_inc_check; do
541                if test -d "$m" && test -f "$m/sql.h"
542                then
543                        UNIXODBC_incdir=$m
544                        break
545                fi
546        done
547                if test -z "$UNIXODBC_incdir"; then
548                AC_MSG_ERROR([Didn't find the unixodbc include dir in '$UNIXODBC_inc_check'])
549        fi
550        case "$UNIXODBC_incdir" in
551          /* ) ;;
552          * )  AC_MSG_ERROR([The unixodbc include directory ($UNIXODBC_incdir) must be an absolute path.]) ;;
553        esac
554        AC_SUBST(UNIXODBC_incdir)
555        AC_MSG_RESULT([$UNIXODBC_incdir])
556
557#       LIBS="$LIBS -lunixodbc"
558fi
559
560for a in $modules
561do
562        moduledirs="$moduledirs ${a}backend"
563
564        for b in `cat $srcdir/modules/${a}backend/OBJECTFILES`
565        do
566                moduleobjects="$moduleobjects ../modules/${a}backend/$b"
567        done
568        modulelibs="$modulelibs `cat $srcdir/modules/${a}backend/OBJECTLIBS`"
569
570        if test ${a} == "gpgsql"; then
571                case "$host_os" in
572                freebsd*)
573                        ;;
574                *)
575                        modulelibs="$modulelibs -lresolv -lnsl"
576                        ;;
577                esac
578        fi
579done
580
581for a in $dynmodules
582do
583        moduledirs="$moduledirs ${a}backend"
584done
585
586AC_SUBST(LIBS)
587
588export moduledirs moduleobjects modulelibs
589
590AC_OUTPUT(Makefile modules/Makefile pdns/Makefile codedocs/Makefile \
591pdns/backends/Makefile pdns/backends/bind/Makefile pdns/pdns pdns/precursor \
592modules/mysqlbackend/Makefile modules/pdnsbackend/Makefile \
593modules/gmysqlbackend/Makefile modules/db2backend/Makefile \
594modules/geobackend/Makefile modules/opendbxbackend/Makefile \
595modules/pipebackend/Makefile modules/oraclebackend/Makefile \
596modules/xdbbackend/Makefile modules/godbcbackend/Makefile \
597modules/odbcbackend/Makefile modules/mongodbbackend/Makefile \
598modules/gpgsqlbackend/Makefile modules/ldapbackend/Makefile \
599modules/gsqlitebackend/Makefile modules/gsqlite3backend/Makefile \
600modules/goraclebackend/Makefile modules/mydnsbackend/Makefile \
601modules/luabackend/Makefile )
Note: See TracBrowser for help on using the browser.