AC_SUBST([rundir])
AC_SUBST([pkgrundir])
AC_SUBST([pkglocalstatedir])
-AC_DEFINE_DIR([PKGLOCALSTATEDIR], [pkglocalstatedir], [[Directory in which to store state, such as band database]])
+AC_DEFINE_DIR([PKGLOCALSTATEDIR], [pkglocalstatedir], [[Directory in which to store state, such as ban database]])
AC_SUBST([pkglibexecdir])
AC_DEFINE_DIR([PKGLIBEXECDIR], [pkglibexecdir], [Directory where binaries the IRCd itself spawns live])
fi
+AC_ARG_WITH(shared-sqlite,
+AC_HELP_STRING([--with-shared-sqlite],[Use shared sqlite]),
+[shared_sqlite=$withval],[shared_sqlite=no])
+
+if test "$shared_sqlite" = yes; then
+
+AC_CHECK_HEADER(sqlite3.h, [
+ AC_CHECK_LIB(sqlite3, sqlite3_open,
+ [
+ AC_SUBST(SQLITE_LD, -lsqlite3)
+ ], shared_sqlite=no)
+], shared_sqlite=no)
+
+fi
+
+if test "$shared_sqlite" = no; then
+ AC_SUBST(SQLITE_SRC, sqlite3.c)
+fi
+
dnl IO Loop Selection
dnl =================