From 6e288ed19c15620c03f6cecbdf63cbf4152c4fe6 Mon Sep 17 00:00:00 2001 From: Tobias Brunner Date: Wed, 12 Feb 2014 14:21:26 +0100 Subject: [PATCH] pool: Install SQL schemas from src/pool This allows us to install the schemas if either the attr-sql or sql plugin is enabled, since both use the same schema (at least in parts). --- src/Makefile.am | 4 ++++ src/libcharon/plugins/sql/Makefile.am | 3 --- src/pool/Makefile.am | 7 +++++++ src/{libcharon/plugins/sql => pool}/mysql.sql | 0 src/{libcharon/plugins/sql => pool}/sqlite.sql | 0 5 files changed, 11 insertions(+), 3 deletions(-) rename src/{libcharon/plugins/sql => pool}/mysql.sql (100%) rename src/{libcharon/plugins/sql => pool}/sqlite.sql (100%) diff --git a/src/Makefile.am b/src/Makefile.am index 264a3cf37..f290d9c85 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -98,6 +98,10 @@ endif if USE_ATTR_SQL SUBDIRS += pool +else +if USE_SQL + SUBDIRS += pool +endif endif if USE_TKM diff --git a/src/libcharon/plugins/sql/Makefile.am b/src/libcharon/plugins/sql/Makefile.am index 50b6dc393..fd5693123 100644 --- a/src/libcharon/plugins/sql/Makefile.am +++ b/src/libcharon/plugins/sql/Makefile.am @@ -17,6 +17,3 @@ libstrongswan_sql_la_SOURCES = \ sql_cred.h sql_cred.c sql_logger.h sql_logger.c libstrongswan_sql_la_LDFLAGS = -module -avoid-version - -templatesdir = $(pkgdatadir)/templates/database/sql -dist_templates_DATA = mysql.sql sqlite.sql diff --git a/src/pool/Makefile.am b/src/pool/Makefile.am index 8b429a4ba..2756f93a5 100644 --- a/src/pool/Makefile.am +++ b/src/pool/Makefile.am @@ -1,3 +1,5 @@ +if USE_ATTR_SQL + ipsec_PROGRAMS = pool pool_SOURCES = \ @@ -14,3 +16,8 @@ AM_CPPFLAGS = \ pool_LDADD = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ $(top_builddir)/src/libhydra/libhydra.la + +endif !USE_ATTR_SQL + +templatesdir = $(pkgdatadir)/templates/database/sql +dist_templates_DATA = mysql.sql sqlite.sql diff --git a/src/libcharon/plugins/sql/mysql.sql b/src/pool/mysql.sql similarity index 100% rename from src/libcharon/plugins/sql/mysql.sql rename to src/pool/mysql.sql diff --git a/src/libcharon/plugins/sql/sqlite.sql b/src/pool/sqlite.sql similarity index 100% rename from src/libcharon/plugins/sql/sqlite.sql rename to src/pool/sqlite.sql