~ubuntu-branches/ubuntu/intrepid/pdns/intrepid-security

« back to all changes in this revision

Viewing changes to modules/pdnsbackend/configure.in

  • Committer: Bazaar Package Importer
  • Author(s): Debian PowerDNS Maintainers
  • Date: 2005-07-29 20:24:33 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050729202433-cfrk71byx0mmmbk6
Tags: 2.9.18-1
* New upstream release (Closes: #318798)
* Drop patches: 64bit-compile-fix.dpatch, addfeatures-ldapbackend.dpatch,
  amd64-compilefix.dpatch, blankout-domain-fix.dpatch,
  consistent-sql.dpatch, dosfix-ldapbackend.dpatch, fix-exit-status.dpatch,
  gpgsql-compilefix.dpatch, gsqlite-compilefix.dpatch, gsqlite-slave.dpatch,
  recursor-slowdown.patch.dpatch, typoinitscript.dpatch, zone2ldap.dpatch
  They are applied upstream.
* The ldapbackend did not properly escape all queries, allowing it to fail
  and not answer questions. (CAN-2005-2301)
* Questions from clients denied recursion could blank out answers to clients
  who are allowed recursion services, temporarily. (CAN-2005-2302)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
dnl Process this file with autoconf to produce a configure script.
2
 
AC_INIT(pdnsbackend.cc)
3
 
AM_INIT_AUTOMAKE(ahudns-pdnsbackend, 2.0rc2)
4
 
AC_CANONICAL_SYSTEM
5
 
AC_PREFIX_DEFAULT(/opt/pdns)
6
 
AC_PROG_CC
7
 
AC_PROG_CXX
8
 
AC_PROG_INSTALL
9
 
AC_PROG_MAKE_SET
10
 
AC_DISABLE_STATIC
11
 
AM_PROG_LIBTOOL
12
 
AC_LANG_CPLUSPLUS
13
 
 
14
 
#
15
 
# Location of MySQL installation
16
 
#
17
 
AC_ARG_WITH(mysql,
18
 
    [  --with-mysql=<path>     root directory path of MySQL installation],
19
 
    [MYSQL_lib_check="$withval/lib/mysql $with_mysql/lib"
20
 
MYSQL_inc_check="$withval/include/mysql"],
21
 
    [MYSQL_lib_check="/usr/local/mysql/lib/mysql /usr/local/lib/mysql /opt/mysql/lib/mysql /usr/lib/mysql /usr/local/mysql/lib /usr/local/lib /opt/mysql/lib /usr/lib"
22
 
MYSQL_inc_check="/usr/local/mysql/include/mysql /usr/local/include/mysql /opt/mysql/include/mysql /opt/mysql/include /usr/include/mysql"])
23
 
 
24
 
AC_ARG_WITH(mysql-lib,
25
 
    [  --with-mysql-lib=<path> directory path of MySQL library installation],
26
 
    [MYSQL_lib_check="$withval/lib/mysql $withval/mysql $withval"])
27
 
 
28
 
AC_ARG_WITH(mysql-includes,
29
 
    [  --with-mysql-includes=<path>
30
 
                          directory path of MySQL header installation],
31
 
    [MYSQL_inc_check="$withval/include/mysql $withval/mysql $withval"])
32
 
 
33
 
AC_MSG_CHECKING([for MySQL library directory])
34
 
MYSQL_libdir=
35
 
for m in $MYSQL_lib_check; do
36
 
        if test -d "$m" && \
37
 
           (test -f "$m/libmysqlclient.so" || test -f "$m/libmysqlclient.a")
38
 
        then
39
 
                MYSQL_libdir=$m
40
 
                break
41
 
        fi
42
 
done
43
 
 
44
 
if test -z "$MYSQL_libdir"; then
45
 
        AC_MSG_ERROR([Didn't find the mysql library dir in '$MYSQL_lib_check'])
46
 
fi
47
 
 
48
 
case "$MYSQL_libdir" in
49
 
  /* ) ;;
50
 
  * )  AC_MSG_ERROR([The MySQL library directory ($MYSQL_libdir) must be an absolute path.]) ;;
51
 
esac
52
 
 
53
 
AC_MSG_RESULT([$MYSQL_libdir])
54
 
 
55
 
case "$MYSQL_libdir" in
56
 
  /usr/lib) ;;
57
 
  *) LDFLAGS="$LDFLAGS -L${MYSQL_libdir}" ;;
58
 
esac
59
 
 
60
 
AC_MSG_CHECKING([for MySQL include directory])
61
 
MYSQL_incdir=
62
 
for m in $MYSQL_inc_check; do
63
 
        if test -d "$m" && test -f "$m/mysql.h"
64
 
        then
65
 
                MYSQL_incdir=$m
66
 
                break
67
 
        fi
68
 
done
69
 
 
70
 
if test -z "$MYSQL_incdir"; then
71
 
        AC_MSG_ERROR([Didn't find the mysql include dir in '$MYSQL_inc_check'])
72
 
fi
73
 
 
74
 
case "$MYSQL_incdir" in
75
 
  /* ) ;;
76
 
  * )  AC_MSG_ERROR([The MySQL include directory ($MYSQL_incdir) must be an absolute path.]) ;;
77
 
esac
78
 
 
79
 
AC_MSG_RESULT([$MYSQL_incdir])
80
 
 
81
 
CPPFLAGS="$CPPFLAGS -I${MYSQL_incdir}"
82
 
 
83
 
dnl Checks for programs.
84
 
 
85
 
dnl Checks for libraries.
86
 
dnl Replace `main' with a function in -ldl:
87
 
AC_CHECK_LIB(dl, main)
88
 
AC_CHECK_LIB(z, main)
89
 
AC_CHECK_LIB(mysqlclient, mysql_store_result)
90
 
dnl Replace `main' with a function in -lpthread:
91
 
AC_CHECK_LIB(pthread, main)
92
 
 
93
 
dnl Checks for header files.
94
 
AC_HEADER_STDC
95
 
AC_CHECK_HEADERS(unistd.h)
96
 
 
97
 
dnl Checks for typedefs, structures, and compiler characteristics.
98
 
 
99
 
dnl Checks for ahudns functions
100
 
dnl Check for ahudns
101
 
 
102
 
search_ahudns=1
103
 
 
104
 
AC_ARG_WITH(ahudns-includes, [  --with-ahudns-includes=PATH Specify location of ahudns headers],
105
 
[ if test x"$withval" = x"no"; then
106
 
    search_ahudns=0
107
 
  else
108
 
    #if test x"$withval" != x"yes"; then
109
 
    if test -d "$withval"; then
110
 
      AHUDNS_INCLUDES="-I$withval"
111
 
      search_ahudns=0
112
 
      has_ahudns=1
113
 
    fi
114
 
  fi
115
 
])
116
 
 
117
 
 
118
 
AC_DEFUN(AC_CHECK_AHUDNS,
119
 
[ if test x"$search_ahudns" != x"0"; then
120
 
    if test -f "$1/$2"; then
121
 
      AC_MSG_RESULT($5)
122
 
      AHUDNS_LIBS="$3"
123
 
      AHUDNS_INCLUDES="$4"
124
 
      search_ahudns=0
125
 
      has_ahudns=1
126
 
    fi
127
 
  fi
128
 
])
129
 
 
130
 
AC_DEFUN(AC_SEARCH_AHUDNS,
131
 
[ AC_MSG_CHECKING("location of ahudns logger.hh include")
132
 
  AC_CHECK_AHUDNS($HOME/programming/ahudns, logger.hh,,-I$HOME/programming/ahudns, "found in $HOME/programming/ahudns")
133
 
  AC_CHECK_AHUDNS(../ahudns, logger.hh,,-I../ahudns, "found in ../ahudns")
134
 
  AC_CHECK_AHUDNS(../ahudns-1.2, logger.hh,,-I../ahudns-1.2, "found in ../ahudns-1.2")
135
 
])
136
 
 
137
 
if test x"$search_ahudns" != x"0"; then
138
 
  AC_SEARCH_AHUDNS()
139
 
fi
140
 
 
141
 
if test x"$has_ahudns" = x"1"; then
142
 
        echo Found ahudns include file, assuming working and compliant ahudns
143
 
else
144
 
        echo
145
 
        echo Did not find ahudns include file
146
 
        echo
147
 
        exit 1 
148
 
fi
149
 
 
150
 
CPPFLAGS="$CPPFLAGS $AHUDNS_INCLUDES"
151
 
 
152
 
 
153
 
dnl Checks for library functions.
154
 
 
155
 
dnl Check for STL
156
 
AC_CHECK_HEADER(sstream,dontneedstl=1)
157
 
 
158
 
if test "$dontneedstl" != "1" 
159
 
then
160
 
search_stl=1
161
 
 
162
 
AC_ARG_WITH(stl-includes, [  --with-stl-includes=PATH Specify location of STL headers],
163
 
[ if test x"$withval" = x"no"; then
164
 
    search_stl=0
165
 
  else
166
 
    #if test x"$withval" != x"yes"; then
167
 
    if test -d "$withval"; then
168
 
      STL_INCLUDES="-I$withval"
169
 
      search_stl=0
170
 
      has_stl=1
171
 
    fi
172
 
  fi
173
 
])
174
 
 
175
 
 
176
 
 
177
 
AC_ARG_WITH(stl-libs, [  --with-stl-libs=PATH    Specify location of STL libs],
178
 
[ if test x"$withval" = x"no"; then
179
 
    search_stl=0
180
 
  else
181
 
    #if test x"$withval" != x"yes"; then
182
 
    if test -d "$withval"; then
183
 
      STL_LIBS="$LIBS -L$withval -lstlport_gcc"
184
 
      search_stl=0
185
 
      has_stl=1
186
 
    fi
187
 
  fi
188
 
])
189
 
 
190
 
AC_DEFUN(AC_CHECK_STL,
191
 
[ if test x"$search_stl" != x"0"; then
192
 
    if test -f "$1/$2"; then
193
 
      AC_MSG_RESULT($5)
194
 
      STL_LIBS="$3"
195
 
      STL_INCLUDES="$4"
196
 
      search_stl=0
197
 
      has_stl=1
198
 
    fi
199
 
  fi
200
 
])
201
 
 
202
 
AC_DEFUN(AC_SEARCH_STL,
203
 
[ AC_MSG_CHECKING("location of sstream")
204
 
  AC_CHECK_STL(/usr/include, sstream, -lstlport_gcc,, "found in /usr/include")
205
 
  AC_CHECK_STL(/usr/include/stlport, sstream, -lstlport_gcc, -I/usr/include/stlport, "found in /usr/include/stlport")
206
 
  AC_CHECK_STL(/usr/include, sstream, -lstlport_gcc,, "found in /usr/include")
207
 
  AC_CHECK_STL(/usr/local/include, sstream, -L/usr/local/lib -lstlport_gcc, -I/usr/local/include, "found in /usr/local")
208
 
  AC_CHECK_STL(/usr/local/include/stl, sstream, -L/usr/local/lib -L/usr/local/lib/stl -lstlport_gcc, -I/usr/local/include/stl, "found in /usr/local/include/stl")
209
 
  AC_CHECK_STL(/home/ahu/download/STLport-4.0/stlport, sstream,-L/home/ahu/download/STLport-4.0/lib/ -lstlport_gcc, -I/home/ahu/download/STLport-4.0/stlport/, "found in /home/ahu/download/STLport-4.0/stlport")
210
 
  AC_CHECK_STL($HOME/STLport-4.0/stlport, sstream,-L$HOME/STLport-4.0/lib/ -lstlport_gcc, -I$HOME/STLport-4.0/stlport/, "found in $HOME/STLport-4.0/stlport")
211
 
])
212
 
 
213
 
if test x"$search_stl" != x"0"; then
214
 
  AC_SEARCH_STL()
215
 
fi
216
 
 
217
 
if test x"$has_stl" = x"1"; then
218
 
        echo Found sstream include file, assuming working and compliant STL
219
 
else
220
 
        echo
221
 
        echo Did not find sstream include file, this probably means that your STL is not
222
 
        echo compliant - the default gcc libstdc++ isn\'t. Download STLport-4.0 from
223
 
        echo http://www.stlport.org, or use --with-stl-includes and --with-stl-libs
224
 
        echo to specify the location of your STL.
225
 
        echo
226
 
        exit 1 
227
 
fi
228
 
 
229
 
CPPFLAGS="$CPPFLAGS $STL_INCLUDES $MYSQLPP_INCLUDES"
230
 
LIBS="$LIBS $STL_LIBS"
231
 
fi
232
 
 
233
 
AM_CONFIG_HEADER(config.h)
234
 
AC_OUTPUT(Makefile)
235