]> the.earth.li Git - onak.git/blobdiff - onak-conf.c
Move to CMake over autoconf
[onak.git] / onak-conf.c
index 5a4400315551694d19eadc6c104223dcada44526..c30260fd6318cbb2d47d5792fe34a8adbf9f0943 100644 (file)
  * You should have received a copy of the GNU General Public License along with
  * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
-
-#include "config.h"
-
 #include <ctype.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <strings.h>
 
+#include "build-config.h"
+
 #include "cleankey.h"
 #include "ll.h"
 #include "log.h"
 #include "onak-conf.h"
 
+#ifdef DBINIT
 extern struct onak_dbctx *DBINIT(struct onak_db_config *dbcfg, bool readonly);
+#endif
 
 /*
  *     config - Runtime configuration for onak.
@@ -51,7 +52,11 @@ struct onak_config config = {
        .backends = NULL,
        .backends_dir = NULL,
 
+#ifdef DBINIT
        .dbinit = DBINIT,
+#else
+       .dbinit = NULL,
+#endif
 
        .clean_policies = ONAK_CLEAN_CHECK_SIGHASH,