Lines 34-51
Link Here
|
34 |
dnl |
34 |
dnl |
35 |
dnl test for MySQL |
35 |
dnl test for MySQL |
36 |
dnl |
36 |
dnl |
37 |
AC_ARG_WITH(mysql, |
37 |
AC_ARG_WITH(mysql, |
38 |
--with-mysql=<directory> mysql installed in <directory>,[ |
38 |
AS_HELP_STRING([--with-mysql=DIR], [mysql installed in DIR]), |
39 |
if test $withval != yes |
39 |
[], |
40 |
then |
40 |
[with_mysql=no]) |
41 |
dir=$withval |
41 |
|
42 |
else |
|
|
43 |
dir="/usr/local" |
44 |
fi |
45 |
mysqldir="" |
46 |
AC_MSG_CHECKING(for MySQL files) |
42 |
AC_MSG_CHECKING(for MySQL files) |
47 |
for d in $dir /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql |
43 |
mysqldir="" |
48 |
do |
44 |
if test "$with_mysql" = no; then |
|
|
45 |
AC_MSG_RESULT(disabled) |
46 |
else |
47 |
for d in $with_mysql /usr /usr/local /usr/local/mysql /opt/mysql /opt/packages/mysql |
48 |
do |
49 |
if test -f $d/lib/mysql/libmysqlclient.so |
49 |
if test -f $d/lib/mysql/libmysqlclient.so |
50 |
then |
50 |
then |
51 |
AC_MSG_RESULT(found mysql in $d) |
51 |
AC_MSG_RESULT(found mysql in $d) |
Lines 59-70
Link Here
|
59 |
mysqldir_suffix= |
59 |
mysqldir_suffix= |
60 |
break |
60 |
break |
61 |
fi |
61 |
fi |
62 |
done |
62 |
done |
63 |
|
63 |
|
64 |
if test x$mysqldir = x |
64 |
if test x$mysqldir = x |
65 |
then |
65 |
then |
66 |
AC_MSG_WARN(MySQL backend not used) |
66 |
AC_MSG_WARN(MySQL backend not used) |
67 |
else |
67 |
else |
68 |
AC_DEFINE(HAVE_MYSQL) |
68 |
AC_DEFINE(HAVE_MYSQL) |
69 |
MYSQLINCLUDES=${mysqldir}/include${mysqldir_suffix} |
69 |
MYSQLINCLUDES=${mysqldir}/include${mysqldir_suffix} |
70 |
MYSQLLIBS=${mysqldir}/lib${mysqldir_suffix} |
70 |
MYSQLLIBS=${mysqldir}/lib${mysqldir_suffix} |
Lines 107-114
Link Here
|
107 |
AC_MSG_RESULT(found new MySQL) |
107 |
AC_MSG_RESULT(found new MySQL) |
108 |
fi |
108 |
fi |
109 |
|
109 |
|
110 |
fi |
110 |
fi |
111 |
]) |
111 |
fi |
112 |
|
112 |
|
113 |
|
113 |
|
114 |
dnl |
114 |
dnl |
Lines 117-147
Link Here
|
117 |
dnl feature is only used in ulogd_MYSQL.c, there are no checks in any |
117 |
dnl feature is only used in ulogd_MYSQL.c, there are no checks in any |
118 |
dnl way. |
118 |
dnl way. |
119 |
dnl |
119 |
dnl |
120 |
|
|
|
121 |
AC_ARG_WITH(mysql-log-ip-as-string, |
120 |
AC_ARG_WITH(mysql-log-ip-as-string, |
122 |
--with-mysql-log-ip-as-string log IPs as string rather than as |
121 |
AS_HELP_STRING([--with-mysql-log-ip-as-string], |
123 |
unsigned long-integer. |
122 |
[log IPs as string rather than as unsigned long-integer]), |
124 |
,[ |
123 |
[ |
125 |
EXTRA_MYSQL_DEF="${EXTRA_MYSQL_DEF} -DIP_AS_STRING=1" |
124 |
EXTRA_MYSQL_DEF="${EXTRA_MYSQL_DEF} -DIP_AS_STRING=1" |
126 |
AC_MSG_WARN(the use of --with-mysql-log-ip-as-string is discouraged) |
125 |
AC_MSG_WARN(the use of --with-mysql-log-ip-as-string is discouraged) |
127 |
]) |
126 |
]) |
128 |
|
127 |
|
129 |
|
128 |
|
130 |
dnl |
129 |
dnl |
131 |
dnl test for PostgreSQL |
130 |
dnl test for PostgreSQL |
132 |
dnl |
131 |
dnl |
133 |
AC_ARG_WITH(pgsql, |
132 |
AC_ARG_WITH(pgsql, |
134 |
--with-pgsql=<directory> pgsql installed in <directory>,[ |
133 |
AS_HELP_STRING([--with-pgsql=DIR],[pgsql installed in DIR]), |
135 |
if test $withval != yes |
134 |
[], |
|
|
135 |
[with_pgsql=no]) |
136 |
|
137 |
AC_MSG_CHECKING(for PGSQL files) |
138 |
pgsqldir="" |
139 |
if test $with_pgsql = no |
136 |
then |
140 |
then |
137 |
dir=$withval |
141 |
AC_MSG_RESULT(disabled) |
138 |
else |
142 |
else |
139 |
dir="/usr/local" |
143 |
for d in $with_pgsql /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql |
140 |
fi |
144 |
do |
141 |
pgsqldir="" |
|
|
142 |
AC_MSG_CHECKING(for PGSQL files) |
143 |
for d in $dir /usr /usr/local /usr/local/pgsql /opt/pgsql /opt/packages/pgsql |
144 |
do |
145 |
if test -f $d/lib/pgsql/libpq.so |
145 |
if test -f $d/lib/pgsql/libpq.so |
146 |
then |
146 |
then |
147 |
AC_MSG_RESULT(found pgsql in $d) |
147 |
AC_MSG_RESULT(found pgsql in $d) |
Lines 153-164
Link Here
|
153 |
pgsqldir=$d |
153 |
pgsqldir=$d |
154 |
break |
154 |
break |
155 |
fi |
155 |
fi |
156 |
done |
156 |
done |
157 |
|
157 |
|
158 |
if test x$pgsqldir = x |
158 |
if test x$pgsqldir = x; then |
159 |
then |
|
|
160 |
AC_MSG_WARN(PGSQL backend not used) |
159 |
AC_MSG_WARN(PGSQL backend not used) |
161 |
else |
160 |
else |
162 |
AC_DEFINE(HAVE_PGSQL) |
161 |
AC_DEFINE(HAVE_PGSQL) |
163 |
for i in include include/postgresql include/pgsql |
162 |
for i in include include/postgresql include/pgsql |
164 |
do |
163 |
do |
Lines 180-215
Link Here
|
180 |
AC_SUBST(PGSQLINCLUDES) |
179 |
AC_SUBST(PGSQLINCLUDES) |
181 |
AC_SUBST(PGSQL_LIB) |
180 |
AC_SUBST(PGSQL_LIB) |
182 |
|
181 |
|
|
|
182 |
fi |
183 |
fi |
183 |
fi |
184 |
]) |
|
|
185 |
|
184 |
|
186 |
dnl |
185 |
dnl |
187 |
dnl Check whether the user wants to log IP-addresses as strings rather |
186 |
dnl Check whether the user wants to log IP-addresses as strings rather |
188 |
dnl than integers to his pgsql-database. |
187 |
dnl than integers to his pgsql-database. |
189 |
dnl |
188 |
dnl |
190 |
|
|
|
191 |
AC_ARG_WITH(pgsql-log-ip-as-string, |
189 |
AC_ARG_WITH(pgsql-log-ip-as-string, |
192 |
--with-pgsql-log-ip-as-string log IPs as string rather than as interger |
190 |
AS_HELP_STRING([--with-pgsql-log-ip-as-string], |
193 |
,[ |
191 |
[log IPs as string rather than as integer]), |
194 |
EXTRA_PGSQL_DEF="-DIP_AS_STRING=1" |
192 |
[EXTRA_PGSQL_DEF="-DIP_AS_STRING=1"]) |
195 |
]) |
|
|
196 |
|
197 |
|
193 |
|
198 |
dnl |
194 |
dnl |
199 |
dnl test for sqlite3 |
195 |
dnl test for sqlite3 |
200 |
dnl |
196 |
dnl |
201 |
AC_ARG_WITH(sqlite3, |
197 |
AC_ARG_WITH(sqlite3, |
202 |
--with-sqlite3=<directory> sqlite3 installed in <directory>,[ |
198 |
AS_HELP_STRING([--with-sqlite3=DIR],[sqlite3 installed in DIR]), |
203 |
if test $withval != yes |
199 |
[], |
|
|
200 |
[with_sqlite3=no]) |
201 |
|
202 |
AC_MSG_CHECKING(for sqlite3 files) |
203 |
sqlite3dir="" |
204 |
if test $with_sqlite3 = no |
204 |
then |
205 |
then |
205 |
dir=$withval |
206 |
AC_MSG_RESULT(disabled) |
206 |
else |
207 |
else |
207 |
dir="/usr/local" |
208 |
for d in $with_sqlite3 /usr /usr/local /usr/local/sqlite3 |
208 |
fi |
209 |
do |
209 |
mysqldir="" |
|
|
210 |
AC_MSG_CHECKING(for sqlite3 files) |
211 |
for d in $dir /usr /usr/local /usr/local/sqlite3 |
212 |
do |
213 |
if test -f $d/lib/sqlite3/libsqlite3.so |
210 |
if test -f $d/lib/sqlite3/libsqlite3.so |
214 |
then |
211 |
then |
215 |
AC_MSG_RESULT(found sqlite3 in $d) |
212 |
AC_MSG_RESULT(found sqlite3 in $d) |
Lines 223-234
Link Here
|
223 |
sqlite3dir_suffix= |
220 |
sqlite3dir_suffix= |
224 |
break |
221 |
break |
225 |
fi |
222 |
fi |
226 |
done |
223 |
done |
227 |
|
224 |
|
228 |
if test x$sqlite3dir = x |
225 |
if test x$sqlite3dir = x |
229 |
then |
226 |
then |
230 |
AC_MSG_WARN(sqlite3 backend not used) |
227 |
AC_MSG_WARN(sqlite3 backend not used) |
231 |
else |
228 |
else |
232 |
AC_DEFINE(HAVE_SQLITE3) |
229 |
AC_DEFINE(HAVE_SQLITE3) |
233 |
SQLITE3INCLUDES=${sqlite3dir}/include${sqlite3dir_suffix} |
230 |
SQLITE3INCLUDES=${sqlite3dir}/include${sqlite3dir_suffix} |
234 |
SQLITE3LIBS=${sqlite3dir}/lib${sqlite3dir_suffix} |
231 |
SQLITE3LIBS=${sqlite3dir}/lib${sqlite3dir_suffix} |
Lines 246-253
Link Here
|
246 |
AC_SUBST(SQLITE3INCLUDES) |
243 |
AC_SUBST(SQLITE3INCLUDES) |
247 |
AC_SUBST(SQLITE3_LIB) |
244 |
AC_SUBST(SQLITE3_LIB) |
248 |
|
245 |
|
249 |
fi |
246 |
fi |
250 |
]) |
247 |
fi |
251 |
|
248 |
|
252 |
|
249 |
|
253 |
dnl |
250 |
dnl |
Lines 256-269
Link Here
|
256 |
dnl feature is only used in ulogd_SQLITE3.c, there are no checks in any |
253 |
dnl feature is only used in ulogd_SQLITE3.c, there are no checks in any |
257 |
dnl way. |
254 |
dnl way. |
258 |
dnl |
255 |
dnl |
259 |
|
|
|
260 |
AC_ARG_WITH(sqlite3-log-ip-as-string, |
256 |
AC_ARG_WITH(sqlite3-log-ip-as-string, |
261 |
--with-sqlite3-log-ip-as-string log IPs as string rather than as |
257 |
AS_HELP_STRING([--with-sqlite3-log-ip-as-string], |
262 |
unsigned long-integer. |
258 |
[log IPs as string rather than as unsigned long-integer]), |
263 |
,[ |
259 |
[ |
264 |
EXTRA_SQLITE3_DEF="${EXTRA_SQLITE3_DEF} -DIP_AS_STRING=1" |
260 |
EXTRA_SQLITE3_DEF="${EXTRA_SQLITE3_DEF} -DIP_AS_STRING=1" |
265 |
AC_MSG_WARN(the use of --with-sqlite3-log-ip-as-string is discouraged) |
261 |
AC_MSG_WARN(the use of --with-sqlite3-log-ip-as-string is discouraged) |
266 |
]) |
262 |
]) |
267 |
|
263 |
|
268 |
|
264 |
|
269 |
AC_SUBST(DATABASE_DIR) |
265 |
AC_SUBST(DATABASE_DIR) |