Index: /trunk/FACT++/src/drivectrl.cc
===================================================================
--- /trunk/FACT++/src/drivectrl.cc	(revision 14038)
+++ /trunk/FACT++/src/drivectrl.cc	(revision 14039)
@@ -5,4 +5,8 @@
 #include <libnova/solar.h>
 #include <libnova/rise_set.h>
+#endif
+
+#ifdef HAVE_SQL
+#include <mysql++/mysql++.h>
 #endif
 
@@ -20,10 +24,4 @@
 
 #include "tools.h"
-
-#define HAS_SQL
-
-#ifdef HAS_SQL
-#include <mysql++/mysql++.h>
-#endif
 
 #include "HeadersDrive.h"
@@ -1227,4 +1225,5 @@
     void ReadDatabase(bool print=true)
     {
+#ifdef HAVE_SQL
         //static const boost::regex expr("(([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))?");
         static const boost::regex expr("(([[:word:].-]+)(:(.+))?@)?([[:word:].-]+)(:([[:digit:]]+))?(/([[:word:].-]+))");
@@ -1295,4 +1294,7 @@
             }
         }
+#else
+        T::Warn("MySQL support not compiled into the program.");
+#endif
     }
 
