import("libm3")


% compile in a stub if no lib to link against

configure_system_libs()

if SYSTEM_LIBS contains "ODBC"
  include_dir ("odbc")
else
  implementation("ODBCDBStub")
end

if SYSTEM_LIBS contains "MYSQL"
  include_dir ("mysqldb")
else
  implementation("MySQLDBStub")
end

if SYSTEM_LIBS contains "POSTGRESQL"
  include_dir ("postgresql")
else
  implementation("PostgreSQLDBStub")
end

Interface("DB")
implementation("DB")
interface("MySQLDB")
interface("PostgreSQLDB")
interface("ODBCDB")

library("db")
