285 |
|
|
286 |
dnl Check for working functions |
dnl Check for working functions |
287 |
|
|
288 |
jm_FUNC_MALLOC |
AC_FUNC_MALLOC |
289 |
jm_FUNC_REALLOC |
AC_FUNC_REALLOC |
290 |
AC_FUNC_ALLOCA |
AC_FUNC_ALLOCA |
291 |
|
|
292 |
jm_INCLUDED_REGEX(lib/regex.c) |
jm_INCLUDED_REGEX(lib/regex.c) |
392 |
[AC_LIBOBJ(obstack)]) |
[AC_LIBOBJ(obstack)]) |
393 |
|
|
394 |
|
|
395 |
dnl check if mysql support was added |
dnl check if SQL support is required |
396 |
AC_SUBST(MYSQLLIBS) |
AC_SUBST(SQLLIBS) |
397 |
AC_ARG_ENABLE([mysql], |
AC_ARG_WITH([mysql], |
398 |
AC_HELP_STRING([--enable-mysql], |
AC_HELP_STRING([--with-mysql], |
399 |
[enable mysql support (default no)]), |
[enable mysql support (default no)]), |
400 |
[use_mysql="yes"],,) |
[use_mysql="yes"],,) |
401 |
if test x"$use_mysql" = x"yes"; then |
|
402 |
AC_CHECK_HEADER(mysql/mysql.h, |
AC_ARG_WITH([postgres], |
403 |
[MYSQLLIBS="-lmysqlclient -lm -L/usr/lib/mysql -L/usr/local/lib/mysql" |
AC_HELP_STRING([--with-postgres], |
404 |
AUTHLIBS="$AUTHLIBS $MYSQLLIBS" |
[enable postgres support (default no)]), |
405 |
AC_DEFINE(HAVE_MYSQL,1,[Define this if you have mysql libraries])]) |
[use_postgres="yes"],,) |
406 |
|
|
407 |
|
AH_TEMPLATE(USE_SQL,[Enables SQL support]) |
408 |
|
AH_TEMPLATE(HAVE_MYSQL,[Define if you have libmysql]) |
409 |
|
AH_TEMPLATE(HAVE_PGSQL,[Define if you have libpq]) |
410 |
|
|
411 |
|
if test x"$use_mysql" = x"yes" -a x"$use_postgres" = x"yes"; then |
412 |
|
AC_MSG_ERROR(Use either --with-mysql or --with-postgres, not both) |
413 |
|
else |
414 |
|
if test x"$use_mysql" = x"yes"; then |
415 |
|
AC_CHECK_HEADER(mysql/mysql.h, |
416 |
|
[MU_CHECK_LIB(mysqlclient, mysql_real_connect, "-lm", |
417 |
|
[ USE_SQL=1 |
418 |
|
AC_DEFINE(USE_SQL) |
419 |
|
AC_DEFINE(HAVE_MYSQL) |
420 |
|
SQLLIBS="$mu_cv_lib_mysqlclient" |
421 |
|
], |
422 |
|
[ AC_MSG_ERROR(-lmysqlclient not found) ], |
423 |
|
[/usr/local/lib/mysql /usr/lib/mysql])]) |
424 |
|
fi |
425 |
|
if test x"$use_postgres" = x"yes"; then |
426 |
|
MU_CHECK_LIB(pq, PQconnectStart, [], |
427 |
|
[ USE_SQL=1 |
428 |
|
AC_DEFINE(HAVE_PGSQL) |
429 |
|
SQLLIBS=$mu_cv_lib_pq], |
430 |
|
[ AC_MSG_ERROR(-lpq not found) ], |
431 |
|
[/usr/local/pgsql/lib /usr/pgsql/lib]) |
432 |
|
fi |
433 |
|
fi |
434 |
|
|
435 |
|
if test x"$USE_SQL" = x1; then |
436 |
|
AUTHLIBS="$AUTHLIBS $SQLLIBS" |
437 |
|
AC_DEFINE(USE_SQL,1,[Define this to enable SQL support]) |
438 |
fi |
fi |
439 |
|
|
440 |
dnl Virtual domain support |
dnl Virtual domain support |