68
68
AC_MSG_CHECKING(for MySQL support)
71
[ --with-mysql Include MySQL support.],
71
[ --with-mysql Include MySQL support.],
72
[ ac_mysql="$withval" ])
73
73
AC_ARG_WITH(mysql-dir,
74
[ --with-mysql-dir Specifies the MySQL root directory.],
74
[ --with-mysql-dir Specifies the MySQL root directory.],
75
75
[ ac_mysql_incdir="$withval"/include
76
76
ac_mysql_libdir="$withval"/lib ])
77
77
AC_ARG_WITH(mysql-incdir,
78
[ --with-mysql-incdir Specifies where the MySQL include files are.],
78
[ --with-mysql-incdir Specifies where the MySQL include files are.],
79
79
[ ac_mysql_incdir="$withval" ])
80
80
AC_ARG_WITH(mysql-libdir,
81
[ --with-mysql-libdir Specifies where the MySQL libraries are.],
81
[ --with-mysql-libdir Specifies where the MySQL libraries are.],
82
82
[ ac_mysql_libdir="$withval" ])
84
if test "$ac_mysql" = "YES"; then
85
if test "$ac_mysql_incdir" = "NO" || test "$ac_mysql_libs" = "NO"; then
84
if test "$ac_mysql" = "yes"; then
85
if test "$ac_mysql_incdir" = "no" || test "$ac_mysql_libs" = "no"; then
86
86
mysql_incdirs="/usr/include /usr/local/include /usr/include/mysql /usr/local/include/mysql /usr/local/mysql/include /usr/local/mysql/include/mysql /opt/mysql/include/mysql /sw/include/mysql"
87
87
AC_FIND_FILE(mysql/mysql.h, $mysql_incdirs, ac_mysql_incdir)
88
88
mysql_libdirs="/usr/lib /usr/local/lib /usr/lib/mysql /usr/local/lib/mysql /usr/local/mysql/lib /usr/local/mysql/lib/mysql /opt/mysql/lib/mysql /sw/lib/mysql"
89
89
mysql_libs="libmysqlclient.so libmysqlclient.a"
90
90
AC_FIND_FILE($mysql_libs, $mysql_libdirs, ac_mysql_libdir)
91
if test "$ac_mysql_incdir" = "NO"; then
91
if test "$ac_mysql_incdir" = "no"; then
93
93
AC_MSG_ERROR([Invalid MySQL directory - include files not found.])
95
if test "$ac_mysql_libdir" = "NO"; then
95
if test "$ac_mysql_libdir" = "no"; then
97
97
AC_MSG_ERROR([Invalid MySQL directory - libraries not found.])
129
129
AC_MSG_CHECKING(for PostgreSQL support)
131
131
AC_ARG_WITH(pgsql,
132
[ --with-pgsql Include PostgreSQL support.],
132
[ --with-pgsql Include PostgreSQL support.],
133
[ ac_pgsql="$withval" ])
134
134
AC_ARG_WITH(pgsql-dir,
135
[ --with-pgsql-dir Specifies the PostgreSQL root directory.],
135
[ --with-pgsql-dir Specifies the PostgreSQL root directory.],
136
136
[ ac_pgsql_incdir="$withval"/include
137
137
ac_pgsql_libdir="$withval"/lib ])
138
138
AC_ARG_WITH(pgsql-incdir,
139
[ --with-pgsql-incdir Specifies where the PostgreSQL include files are.],
139
[ --with-pgsql-incdir Specifies where the PostgreSQL include files are.],
140
140
[ ac_pgsql_incdir="$withval" ])
141
141
AC_ARG_WITH(pgsql-libdir,
142
[ --with-pgsql-libdir Specifies where the PostgreSQL libraries are.],
142
[ --with-pgsql-libdir Specifies where the PostgreSQL libraries are.],
143
143
[ ac_pgsql_libdir="$withval" ])
145
if test "$ac_pgsql" = "YES"; then
146
if test "$ac_pgsql_incdir" = "NO" || test "$ac_pgsql_libs" = "NO"; then
145
if test "$ac_pgsql" = "yes"; then
146
if test "$ac_pgsql_incdir" = "no" || test "$ac_pgsql_libs" = "no"; then
147
147
pgsql_incdirs="/usr/include /usr/local/include /usr/include/pgsql /usr/local/include/pgsql /usr/local/pgsql/include /usr/include/postgresql /usr/local/postgresql/include /opt/pgsql/include"
148
148
AC_FIND_FILE(libpq-fe.h, $pgsql_incdirs, ac_pgsql_incdir)
149
149
pgsql_libdirs="/usr/lib /usr/local/lib /usr/lib/pgsql /usr/local/lib/pgsql /usr/local/pgsql/lib /opt/pgsql/lib"
150
150
pgsql_libs="libpq.so libpq.a"
151
151
AC_FIND_FILE($pgsql_libs, $pgsql_libdirs, ac_pgsql_libdir)
152
if test "$ac_pgsql_incdir" = "NO"; then
152
if test "$ac_pgsql_incdir" = "no"; then
153
153
AC_MSG_RESULT(no)
154
154
AC_MSG_ERROR([Invalid PostgreSQL directory - include files not found.])
156
if test "$ac_pgsql_libdir" = "NO"; then
156
if test "$ac_pgsql_libdir" = "no"; then
157
157
AC_MSG_RESULT(no)
158
158
AC_MSG_ERROR([Invalid PostgreSQL directory - libraries not found.])
190
190
AC_MSG_CHECKING(for SQLite support)
192
192
AC_ARG_WITH(sqlite,
193
[ --with-sqlite Include SQLite support.],
193
[ --with-sqlite Include SQLite support.],
194
[ ac_sqlite="$withval" ])
195
195
AC_ARG_WITH(sqlite-dir,
196
[ --with-sqlite-dir Specifies the SQLite root directory.],
196
[ --with-sqlite-dir Specifies the SQLite root directory.],
197
197
[ ac_sqlite_incdir="$withval"/include
198
198
ac_sqlite_libdir="$withval"/lib ])
199
199
AC_ARG_WITH(sqlite-incdir,
200
[ --with-sqlite-incdir Specifies where the SQLite include files are.],
200
[ --with-sqlite-incdir Specifies where the SQLite include files are.],
201
201
[ ac_sqlite_incdir="$withval" ])
202
202
AC_ARG_WITH(sqlite-libdir,
203
[ --with-sqlite-libdir Specifies where the SQLite libraries are.],
203
[ --with-sqlite-libdir Specifies where the SQLite libraries are.],
204
204
[ ac_sqlite_libdir="$withval" ])
206
if test "$ac_sqlite" = "YES"; then
207
if test "$ac_sqlite_incdir" = "NO" || test "$ac_sqlite_libs" = "NO"; then
206
if test "$ac_sqlite" = "yes"; then
207
if test "$ac_sqlite_incdir" = "no" || test "$ac_sqlite_libs" = "no"; then
208
208
sqlite_incdirs="/usr/include /usr/local/include /usr/include/sqlite /usr/local/include/sqlite /usr/local/sqlite/include /opt/sqlite/include"
209
209
AC_FIND_FILE(sqlite.h, $sqlite_incdirs, ac_sqlite_incdir)
210
210
sqlite_libdirs="/usr/lib /usr/local/lib /usr/lib/sqlite /usr/local/lib/sqlite /usr/local/sqlite/lib /opt/sqlite/lib"
211
211
sqlite_libs="libsqlite.so libsqlite.a"
212
212
AC_FIND_FILE($sqlite_libs, $sqlite_libdirs, ac_sqlite_libdir)
213
if test "$ac_sqlite_incdir" = "NO"; then
213
if test "$ac_sqlite_incdir" = "no"; then
214
214
AC_MSG_RESULT(no)
215
215
AC_MSG_ERROR([Invalid SQLite directory - include files not found.])
217
if test "$ac_sqlite_libdir" = "NO"; then
217
if test "$ac_sqlite_libdir" = "no"; then
218
218
AC_MSG_RESULT(no)
219
219
AC_MSG_ERROR([Invalid SQLite directory - libraries not found.])
239
AC_DEFUN([AC_CHECK_SQLITE3],
241
AM_CONDITIONAL(HAVE_SQLITE3, false)
243
ac_sqlite3_incdir="no"
244
ac_sqlite3_libdir="no"
251
AC_MSG_CHECKING(for SQLite3 support)
254
[ --with-sqlite3 Include SQLite3 support.],
255
[ ac_sqlite3="$withval" ])
256
AC_ARG_WITH(sqlite3-dir,
257
[ --with-sqlite3-dir Specifies the SQLite3 root directory.],
258
[ ac_sqlite3_incdir="$withval"/include
259
ac_sqlite3_libdir="$withval"/lib ])
260
AC_ARG_WITH(sqlite3-incdir,
261
[ --with-sqlite3-incdir Specifies where the SQLite3 include files are.],
262
[ ac_sqlite3_incdir="$withval" ])
263
AC_ARG_WITH(sqlite3-libdir,
264
[ --with-sqlite3-libdir Specifies where the SQLite3 libraries are.],
265
[ ac_sqlite3_libdir="$withval" ])
267
if test "$ac_sqlite3" = "yes"; then
268
if test "$ac_sqlite3_incdir" = "no" || test "$ac_sqlite3_libs" = "no"; then
269
sqlite3_incdirs="/usr/include /usr/local/include /usr/include/sqlite3 /usr/local/include/sqlite3 /usr/local/sqlite3/include /opt/sqlite3/include"
270
AC_FIND_FILE(sqlite3.h, $sqlite3_incdirs, ac_sqlite3_incdir)
271
sqlite3_libdirs="/usr/lib /usr/local/lib /usr/lib/sqlite3 /usr/local/lib/sqlite3 /usr/local/sqlite3/lib /opt/sqlite3/lib"
272
sqlite3_libs="libsqlite3.so libsqlite3.a"
273
AC_FIND_FILE($sqlite3_libs, $sqlite3_libdirs, ac_sqlite3_libdir)
274
if test "$ac_sqlite3_incdir" = "no"; then
276
AC_MSG_ERROR([Invalid SQLite3 directory - include files not found.])
278
if test "$ac_sqlite3_libdir" = "no"; then
280
AC_MSG_ERROR([Invalid SQLite3 directory - libraries not found.])
283
AC_MSG_RESULT([yes: libs in $ac_sqlite3_libdir, headers in $ac_sqlite3_incdir])
284
AM_CONDITIONAL(HAVE_SQLITE3, true)
286
SQLITE3_LIBS=-lsqlite3
287
SQLITE3_INCLUDE=-I$ac_sqlite3_incdir
288
SQLITE3_LDFLAGS=-L$ac_sqlite3_libdir
290
AC_SUBST(SQLITE3_LIBS)
291
AC_SUBST(SQLITE3_INCLUDE)
292
AC_SUBST(SQLITE3_LDFLAGS)
239
AC_DEFUN(AC_CHECK_MSQL,
300
AC_DEFUN([AC_CHECK_MSQL],
241
302
AM_CONDITIONAL(HAVE_MSQL, false)
246
307
# exported variables
251
312
AC_MSG_CHECKING(for MiniSQL (mSQL) support)
253
314
AC_ARG_WITH(msql,
254
[ --with-msql Include mSQL support.],
315
[ --with-msql Include mSQL support.],
316
[ ac_msql="$withval" ])
256
317
AC_ARG_WITH(msql-dir,
257
[ --with-msql-dir Specifies the mSQL root directory.],
318
[ --with-msql-dir Specifies the mSQL root directory.],
258
319
[ ac_msql_incdir="$withval"/include
259
320
ac_msql_libdir="$withval"/lib ])
260
321
AC_ARG_WITH(msql-incdir,
261
[ --with-msql-incdir Specifies where the mSQL include files are.],
322
[ --with-msql-incdir Specifies where the mSQL include files are.],
262
323
[ ac_msql_incdir="$withval" ])
263
324
AC_ARG_WITH(msql-libdir,
264
[ --with-msql-libdir Specifies where the mSQL libraries are.],
325
[ --with-msql-libdir Specifies where the mSQL libraries are.],
265
326
[ ac_msql_libdir="$withval" ])
267
if test "$ac_msql" = "YES"; then
268
if test "$ac_msql_incdir" = "NO" || test "$ac_msql_libs" = "NO"; then
328
if test "$ac_msql" = "yes"; then
329
if test "$ac_msql_incdir" = "no" || test "$ac_msql_libs" = "no"; then
269
330
msql_incdirs="/usr/local/msql3/include /usr/msql3/include /opt/msql3/include/ /usr/include /usr/local/include"
270
331
AC_FIND_FILE(msql.h, $msql_incdirs, ac_msql_incdir)
271
332
msql_libdirs="/usr/lib /usr/local/lib /usr/lib/msql3 /usr/local/lib/msql /usr/local/msql3/lib /opt/msql3/lib"
272
333
AC_FIND_FILE(libmsql.a, $msql_libdirs, ac_msql_libdir)
273
if test "$ac_msql_incdir" = "NO"; then
334
if test "$ac_msql_incdir" = "no"; then
274
335
AC_MSG_RESULT(no)
275
336
AC_MSG_ERROR([Invalid mSQL directory - include files not found.])
277
if test "$ac_msql_libdir" = "NO"; then
338
if test "$ac_msql_libdir" = "no"; then
278
339
AC_MSG_RESULT(no)
279
340
AC_MSG_ERROR([Invalid mSQL directory - libraries not found.])
311
372
AC_MSG_CHECKING(for Oracle support)
313
374
AC_ARG_WITH(oracle,
314
[ --with-oracle Include Oracle support.],
375
[ --with-oracle Include Oracle support.],
376
[ ac_oracle="$withval" ])
316
377
AC_ARG_WITH(oracle-dir,
317
[ --with-oracle-dir Specifies ORACLE_HOME.],
378
[ --with-oracle-dir Specifies ORACLE_HOME.],
318
379
[ ac_oracle_incdir="$withval"/rdbms/demo
319
380
ac_oracle_libdir="$withval"/lib ])
320
381
AC_ARG_WITH(oracle-incdir,
321
[ --with-oracle-incdir Specifies where the Oracle include files are.],
382
[ --with-oracle-incdir Specifies where the Oracle include files are.],
322
383
[ ac_oracle_incdir="$withval" ])
323
384
AC_ARG_WITH(oracle-libdir,
324
[ --with-oracle-libdir Specifies where the Oracle libraries are.],
385
[ --with-oracle-libdir Specifies where the Oracle libraries are.],
325
386
[ ac_oracle_libdir="$withval" ])
327
if test "$ac_oracle" = "YES"; then
328
if test "$ac_oracle_incdir" = "NO" || test "$ac_oracle_libs" = "NO"; then
388
if test "$ac_oracle" = "yes"; then
389
if test "$ac_oracle_incdir" = "no" || test "$ac_oracle_libs" = "no"; then
329
390
oracle_incdirs="$ORACLE_HOME/rdbms/demo $ORACLE_HOME/rdbms/public"
330
391
AC_FIND_FILE(oci.h, $oracle_incdirs, ac_oracle_incdir)
331
392
oracle_libdirs="$ORACLE_HOME/lib"
332
393
AC_FIND_FILE(libclntsh.so, $oracle_libdirs, ac_oracle_libdir)
333
if test "$ac_oracle_incdir" = "NO"; then
394
if test "$ac_oracle_incdir" = "no"; then
334
395
AC_MSG_RESULT(no)
335
396
AC_MSG_ERROR([Invalid Oracle directory - include files not found.])
337
if test "$ac_oracle_libdir" = "NO"; then
398
if test "$ac_oracle_libdir" = "no"; then
338
399
AC_MSG_RESULT(no)
339
400
AC_MSG_ERROR([Invalid Oracle directory - libraries not found.])
353
414
AC_MSG_RESULT(no)
420
AC_DEFUN([AC_CHECK_FIREBIRD_INTERBASE],
422
AM_CONDITIONAL(HAVE_FIREBIRD_INTERBASE, false)
424
ac_firebird_incdir="no"
425
ac_firebird_libdir="no"
432
AC_MSG_CHECKING(for Firebird/Interbase support)
434
AC_ARG_WITH(firebird,
435
[ --with-firebird Include Firebird support.],
436
[ ac_firebird="$withval" ])
437
AC_ARG_WITH(firebird-dir,
438
[ --with-firebird-dir Specifies Firebird directory.],
439
[ ac_firebird_incdir="$withval"/include
440
ac_firebird_libdir="$withval"/lib ])
441
AC_ARG_WITH(firebird-incdir,
442
[ --with-firebird-incdir Specifies where Firebird/Interbase include files are.],
443
[ ac_firebird_incdir="$withval" ])
444
AC_ARG_WITH(firebird-libdir,
445
[ --with-firebird-libdir Specifies where Firebird/Interbase libraries are.],
446
[ ac_firebird_libdir="$withval" ])
448
if test "$ac_firebird" = "yes"; then
449
if test "$ac_firebird_incdir" = "no" || test "$ac_firebird_libs" = "no"; then
450
firebird_incdirs="/opt/firebird/include /usr/include /usr/local/include /usr/include/firebird /usr/local/include/firebird /usr/local/firebird/include /opt/firebird/include"
451
AC_FIND_FILE(ibase.h, $firebird_incdirs, ac_firebird_incdir)
452
firebird_libdirs="/opt/firebird/lib /usr/lib /usr/local/lib /usr/lib/firebird /usr/local/lib/firebird /usr/local/firebird/lib /opt/firebird/lib"
453
AC_FIND_FILE(libfbclient.so, $firebird_libdirs, ac_firebird_libdir)
454
if test "$ac_firebird_incdir" = "no"; then
456
AC_MSG_ERROR([Invalid Firebird/Interbase directory - include files not found.])
458
if test "$ac_firebird_libdir" = "no"; then
460
AC_MSG_ERROR([Invalid Firebird/Interbase directory - libraries not found.])
463
AC_MSG_RESULT([yes: libs in $ac_firebird_libdir, headers in $ac_firebird_incdir])
464
AM_CONDITIONAL(HAVE_FIREBIRD_INTERBASE, true)
466
dnl libfbclient needs pthreads
467
AC_SEARCH_LIBS(pthread_create, c_r pthread,,)
469
FIREBIRD_LIBS="-lfbclient"
470
FIREBIRD_INCLUDE="-I$ac_firebird_incdir"
471
FIREBIRD_LDFLAGS=-L$ac_firebird_libdir
473
AC_SUBST(FIREBIRD_LIBS)
474
AC_SUBST(FIREBIRD_INCLUDE)
475
AC_SUBST(FIREBIRD_LDFLAGS)
483
AC_DEFUN([AC_CHECK_FREETDS],
485
AM_CONDITIONAL(HAVE_FREETDS, false)
487
ac_freetds_incdir="no"
488
ac_freetds_libdir="no"
495
AC_MSG_CHECKING(for Freetds support)
498
[ --with-freetds Include Freetds support.],
499
[ ac_freetds="$withval" ])
500
AC_ARG_WITH(freetds-dir,
501
[ --with-freetds-dir Specifies FREETDS_HOME.],
502
[ ac_freetds_incdir="$withval"/include
503
ac_freetds_libdir="$withval"/lib ])
504
AC_ARG_WITH(freetds-incdir,
505
[ --with-freetds-incdir Specifies where the Freetds include files are.],
506
[ ac_freetds_incdir="$withval" ])
507
AC_ARG_WITH(freetds-libdir,
508
[ --with-freetds-libdir Specifies where the Freetds libraries are.],
509
[ ac_freetds_libdir="$withval" ])
511
if test "$ac_freetds" = "yes"; then
512
if test "$ac_freetds_incdir" = "no" || test "$ac_freetds_libs" = "no"; then
513
freetds_incdirs="/usr/include /usr/local/include"
514
AC_FIND_FILE(tds.h, $freetds_incdirs, ac_freetds_incdir)
515
freetds_libdirs="/usr/lib /usr/local/lib"
516
AC_FIND_FILE(libtds.so, $freetds_libdirs, ac_freetds_libdir)
517
if test "$ac_freetds_incdir" = "no"; then
519
AC_MSG_ERROR([Invalid Freetds directory - include files not found.])
521
if test "$ac_freetds_libdir" = "no"; then
523
AC_MSG_ERROR([Invalid Freetds directory - libraries not found.])
526
AC_MSG_RESULT([yes: libs in $ac_freetds_libdir, headers in $ac_freetds_incdir])
527
AM_CONDITIONAL(HAVE_FREETDS, true)
530
FREETDS_INCLUDE=-I$ac_freetds_incdir
531
FREETDS_LDFLAGS=-L$ac_freetds_libdir
533
AC_SUBST(FREETDS_LIBS)
534
AC_SUBST(FREETDS_INCLUDE)
535
AC_SUBST(FREETDS_LDFLAGS)
543
AC_DEFUN([AC_CHECK_INGRES],
545
AM_CONDITIONAL(HAVE_INGRES, false)
547
ac_ingres_incdir="no"
548
ac_ingres_libdir="no"
555
AC_MSG_CHECKING(for Ingres support)
558
[ --with-ingres Include Ingres support.],
559
[ ac_ingres="$withval" ])
560
AC_ARG_WITH(ingres-dir,
561
[ --with-ingres-dir Specifies II_SYSTEM.],
562
[ ac_ingres_incdir="$withval"/ingres/files
563
ac_ingres_libdir="$withval"/ingres/lib ])
564
AC_ARG_WITH(ingres-incdir,
565
[ --with-ingres-incdir Specifies where the Ingres include files are.],
566
[ ac_ingres_incdir="$withval" ])
567
AC_ARG_WITH(ingres-libdir,
568
[ --with-ingres-libdir Specifies where the Ingres libraries are.],
569
[ ac_ingres_libdir="$withval" ])
571
if test "$ac_ingres" = "yes"; then
572
if test "$ac_ingres_incdir" = "no" || test "$ac_ingres_libs" = "no"; then
573
ingres_incdirs="/usr/include /usr/local/include /opt/Ingres/IngresII/ingres/files"
574
AC_FIND_FILE(iiapi.h, $ingres_incdirs, ac_ingres_incdir)
575
ingres_libdirs="/usr/lib /usr/local/lib /opt/Ingres/IngresII/ingres/lib"
576
AC_FIND_FILE(libingres.a, $ingres_libdirs, ac_ingres_libdir)
577
if test "$ac_ingres_incdir" = "no"; then
579
AC_MSG_ERROR([Invalid Ingres directory - include files not found.])
581
if test "$ac_ingres_libdir" = "no"; then
583
AC_MSG_ERROR([Invalid Ingres directory - libraries not found.])
586
AC_MSG_RESULT([yes: libs in $ac_ingres_libdir, headers in $ac_ingres_incdir])
587
AM_CONDITIONAL(HAVE_INGRES, true)
589
INGRES_LIBS="-lingres -lpthread -ldl -lm -lcrypt"
590
INGRES_INCLUDE=-I$ac_ingres_incdir
591
INGRES_LDFLAGS=-L$ac_ingres_libdir
593
AC_SUBST(INGRES_LIBS)
594
AC_SUBST(INGRES_INCLUDE)
595
AC_SUBST(INGRES_LDFLAGS)