summaryrefslogtreecommitdiff
path: root/server/src/database.cc
diff options
context:
space:
mode:
authordeva <deva>2009-02-17 12:07:03 +0000
committerdeva <deva>2009-02-17 12:07:03 +0000
commit417532e9def7d5568ec9804a65078f2b42707a4a (patch)
treeef26189f18fe19a4b9a92a8b07b957688e6e0eca /server/src/database.cc
parent8dde5e5e15434eb83e8514220973e3cf8b56a393 (diff)
Made the --with-db=no configure option actually compile without the db (even without an installed libpqxx).
Diffstat (limited to 'server/src/database.cc')
-rw-r--r--server/src/database.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/database.cc b/server/src/database.cc
index 74579c1..6a25f93 100644
--- a/server/src/database.cc
+++ b/server/src/database.cc
@@ -35,15 +35,19 @@
Database::Database(std::string _backend, std::string _host, std::string _port, std::string _user, std::string _passwd, std::string _dbname)
{
+#ifndef WITHOUT_DB
dao = NULL;
if(_backend == "pgsql") {
PRACRO_DEBUG(db, "construct(%s, %s, %s, %s, %s)\n", _host.c_str(), _port.c_str(), _user.c_str(), _passwd.c_str(), _dbname.c_str());
dao = new PracroDAOPgsql(_host, _port, _user, _passwd, _dbname);
}
+#endif/*WITHOUT_DB*/
}
Database::~Database()
{
+#ifndef WITHOUT_DB
if(dao) delete dao;
+#endif/*WITHOUT_DB*/
}