31
31
if test "$withval" = "yes"; then
32
AC_CHECK_HEADER(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
33
if test "$apu_have_pgsql" == "0"; then
34
AC_CHECK_HEADER(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
35
if test "$apu_have_pgsql" != "0"; then
36
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/postgresql])
32
AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
33
if test "$apu_have_pgsql" = "0"; then
34
AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
39
36
elif test "$withval" = "no"; then
42
CPPFLAGS="-I$withval/include"
43
LIBS="-L$withval/lib "
39
old_cppflags="$CPPFLAGS"
40
old_ldflags="$LDFLAGS"
42
pgsql_CPPFLAGS="-I$withval/include"
43
pgsql_LDFLAGS="-L$withval/lib "
45
APR_ADDTO(CPPFLAGS, [$pgsql_CPPFLAGS])
46
APR_ADDTO(LDFLAGS, [$pgsql_LDFLAGS])
45
48
AC_MSG_NOTICE(checking for pgsql in $withval)
46
AC_CHECK_HEADER(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
49
AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
47
50
if test "$apu_have_pgsql" != "0"; then
48
51
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
49
52
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
51
54
if test "$apu_have_pgsql" != "1"; then
52
AC_CHECK_HEADER(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
55
AC_CHECK_HEADERS(postgresql/libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
53
56
if test "$apu_have_pgsql" != "0"; then
54
57
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/postgresql])
55
58
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
62
CPPFLAGS="$old_cppflags"
63
LDFLAGS="$old_ldflags"
61
AC_CHECK_HEADER(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
67
AC_CHECK_HEADERS(libpq-fe.h, AC_CHECK_LIB(pq, PQsendQueryPrepared, [apu_have_pgsql=1]))
63
69
AC_SUBST(apu_have_pgsql)
64
70
dnl Since we have already done the AC_CHECK_LIB tests, if we have it,
72
78
AC_DEFUN([APU_CHECK_DBD_MYSQL], [
75
AC_ARG_WITH([mysql], [
76
--with-mysql=DIR **** SEE INSTALL.MySQL ****
79
if test "$withval" = "yes"; then
80
AC_CHECK_HEADER(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
81
if test "$apu_have_mysql" == "0"; then
82
AC_CHECK_HEADER(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
81
AC_CHECK_FILES([dbd/apr_dbd_mysql.c],[
82
AC_ARG_WITH([mysql], [
83
--with-mysql=DIR **** SEE INSTALL.MySQL ****
86
if test "$withval" = "yes"; then
87
old_cppflags="$CPPFLAGS"
88
old_ldflags="$LDFLAGS"
90
AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
91
if test "x$MYSQL_CONFIG" != 'x'; then
92
mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
93
mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
95
APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
96
APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
99
AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
100
if test "$apu_have_mysql" = "0"; then
101
AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
103
if test "x$MYSQL_CONFIG" != 'x'; then
104
APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
105
APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
109
CPPFLAGS="$old_cppflags"
110
LDFLAGS="$old_ldflags"
111
elif test "$withval" = "no"; then
114
old_cppflags="$CPPFLAGS"
115
old_ldflags="$LDFLAGS"
117
AC_PATH_PROG([MYSQL_CONFIG],[mysql_config],,[$withval/bin])
118
if test "x$MYSQL_CONFIG" != 'x'; then
119
mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
120
mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
122
mysql_CPPFLAGS="-I$withval/include"
123
mysql_LDFLAGS="-L$withval/lib "
126
APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
127
APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
129
AC_MSG_NOTICE(checking for mysql in $withval)
130
AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
83
131
if test "$apu_have_mysql" != "0"; then
84
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/myql])
132
APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
133
APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
136
if test "$apu_have_mysql" != "1"; then
137
AC_CHECK_HEADERS(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
138
if test "$apu_have_mysql" != "0"; then
139
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
140
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
144
CPPFLAGS="$old_cppflags"
145
LDFLAGS="$old_ldflags"
87
elif test "$withval" = "no"; then
90
CPPFLAGS="-I$withval/include"
91
LIBS="-L$withval/lib "
93
AC_MSG_NOTICE(checking for mysql in $withval)
94
AC_CHECK_HEADER(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
150
old_cppflags="$CPPFLAGS"
151
old_ldflags="$LDFLAGS"
153
AC_PATH_PROG([MYSQL_CONFIG],[mysql_config])
154
if test "x$MYSQL_CONFIG" != 'x'; then
155
mysql_CPPFLAGS="`$MYSQL_CONFIG --include`"
156
mysql_LDFLAGS="`$MYSQL_CONFIG --libs_r`"
158
APR_ADDTO(CPPFLAGS, [$mysql_CPPFLAGS])
159
APR_ADDTO(LDFLAGS, [$mysql_LDFLAGS])
162
AC_CHECK_HEADERS(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
95
164
if test "$apu_have_mysql" != "0"; then
96
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
97
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
100
if test "$apu_have_mysql" != "1"; then
101
AC_CHECK_HEADER(mysql/mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
102
if test "$apu_have_mysql" != "0"; then
103
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include/mysql])
104
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
165
if test "x$MYSQL_CONFIG" != 'x'; then
166
APR_ADDTO(APRUTIL_INCLUDES, [$mysql_CPPFLAGS])
167
APR_ADDTO(APRUTIL_LDFLAGS, [$mysql_LDFLAGS])
110
AC_CHECK_HEADER(mysql.h, AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]))
171
CPPFLAGS="$old_cppflags"
172
LDFLAGS="$old_ldflags"
113
176
AC_SUBST(apu_have_mysql)
129
192
apu_have_sqlite3=0
130
193
if test "$withval" = "yes"; then
131
AC_CHECK_HEADER(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
194
AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
132
195
elif test "$withval" = "no"; then
133
196
apu_have_sqlite3=0
135
CPPFLAGS="-I$withval/include"
136
LIBS="-L$withval/lib "
198
old_cppflags="$CPPFLAGS"
199
old_ldflags="$LDFLAGS"
201
sqlite3_CPPFLAGS="-I$withval/include"
202
sqlite3_LDFLAGS="-L$withval/lib "
204
APR_ADDTO(CPPFLAGS, [$sqlite3_CPPFLAGS])
205
APR_ADDTO(LDFLAGS, [$sqlite3_LDFLAGS])
138
207
AC_MSG_NOTICE(checking for sqlite3 in $withval)
139
AC_CHECK_HEADER(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
208
AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
140
209
if test "$apu_have_sqlite3" != "0"; then
141
210
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
142
211
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
214
CPPFLAGS="$old_cppflags"
215
LDFLAGS="$old_ldflags"
146
218
apu_have_sqlite3=0
147
AC_CHECK_HEADER(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
219
AC_CHECK_HEADERS(sqlite3.h, AC_CHECK_LIB(sqlite3, sqlite3_open, [apu_have_sqlite3=1]))
150
222
AC_SUBST(apu_have_sqlite3)
166
238
apu_have_sqlite2=0
167
239
if test "$withval" = "yes"; then
168
AC_CHECK_HEADER(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
240
AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
169
241
elif test "$withval" = "no"; then
170
242
apu_have_sqlite2=0
172
CPPFLAGS="-I$withval/include"
173
LIBS="-L$withval/lib "
244
old_cppflags="$CPPFLAGS"
245
old_ldflags="$LDFLAGS"
247
sqlite2_CPPFLAGS="-I$withval/include"
248
sqlite2_LDFLAGS="-L$withval/lib "
250
APR_ADDTO(CPPFLAGS, [$sqlite2_CPPFLAGS])
251
APR_ADDTO(LDFLAGS, [$sqlite2_LDFLAGS])
175
253
AC_MSG_NOTICE(checking for sqlite2 in $withval)
176
AC_CHECK_HEADER(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
254
AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
177
255
if test "$apu_have_sqlite2" != "0"; then
178
256
APR_ADDTO(APRUTIL_LDFLAGS, [-L$withval/lib])
179
257
APR_ADDTO(APRUTIL_INCLUDES, [-I$withval/include])
260
CPPFLAGS="$old_cppflags"
261
LDFLAGS="$old_ldflags"
183
264
apu_have_sqlite2=0
184
AC_CHECK_HEADER(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
265
AC_CHECK_HEADERS(sqlite.h, AC_CHECK_LIB(sqlite, sqlite_open, [apu_have_sqlite2=1]))
187
268
AC_SUBST(apu_have_sqlite2)