From 82e4b83378129900c9b7cc9355ae18d765885d5b Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 4 Nov 2014 14:22:20 +0100 Subject: [PATCH] attr-sql: Move plugin to libcharon --- configure.ac | 6 +++--- src/libcharon/Makefile.am | 7 +++++++ src/{libhydra => libcharon}/plugins/attr_sql/Makefile.am | 3 ++- .../plugins/attr_sql/attr_sql_plugin.c | 0 .../plugins/attr_sql/attr_sql_plugin.h | 2 +- .../plugins/attr_sql/sql_attribute.c | 0 .../plugins/attr_sql/sql_attribute.h | 0 src/libhydra/Makefile.am | 7 ------- src/pool/Makefile.am | 4 +++- 9 files changed, 16 insertions(+), 13 deletions(-) rename src/{libhydra => libcharon}/plugins/attr_sql/Makefile.am (85%) rename src/{libhydra => libcharon}/plugins/attr_sql/attr_sql_plugin.c (100%) rename src/{libhydra => libcharon}/plugins/attr_sql/attr_sql_plugin.h (98%) rename src/{libhydra => libcharon}/plugins/attr_sql/sql_attribute.c (100%) rename src/{libhydra => libcharon}/plugins/attr_sql/sql_attribute.h (100%) diff --git a/configure.ac b/configure.ac index 3e1e6fb64..b0c349974 100644 --- a/configure.ac +++ b/configure.ac @@ -1257,7 +1257,7 @@ ADD_PLUGIN([soup], [s charon pki scripts nm cmd]) ADD_PLUGIN([mysql], [s charon pool manager medsrv attest]) ADD_PLUGIN([sqlite], [s charon pool manager medsrv attest]) ADD_PLUGIN([attr], [c charon]) -ADD_PLUGIN([attr-sql], [h charon]) +ADD_PLUGIN([attr-sql], [c charon]) ADD_PLUGIN([load-tester], [c charon]) ADD_PLUGIN([kernel-libipsec], [c charon cmd]) ADD_PLUGIN([kernel-wfp], [c charon]) @@ -1483,10 +1483,10 @@ AM_CONDITIONAL(USE_ADDRBLOCK, test x$addrblock = xtrue) AM_CONDITIONAL(USE_UNITY, test x$unity = xtrue) AM_CONDITIONAL(USE_RESOLVE, test x$resolve = xtrue) AM_CONDITIONAL(USE_ATTR, test x$attr = xtrue) +AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue) # hydra plugins # --------------- -AM_CONDITIONAL(USE_ATTR_SQL, test x$attr_sql = xtrue) AM_CONDITIONAL(USE_KERNEL_NETLINK, test x$kernel_netlink = xtrue) AM_CONDITIONAL(USE_KERNEL_PFKEY, test x$kernel_pfkey = xtrue) AM_CONDITIONAL(USE_KERNEL_PFROUTE, test x$kernel_pfroute = xtrue) @@ -1649,7 +1649,6 @@ AC_CONFIG_FILES([ src/libstrongswan/plugins/test_vectors/Makefile src/libstrongswan/tests/Makefile src/libhydra/Makefile - src/libhydra/plugins/attr_sql/Makefile src/libhydra/plugins/kernel_netlink/Makefile src/libhydra/plugins/kernel_pfkey/Makefile src/libhydra/plugins/kernel_pfroute/Makefile @@ -1750,6 +1749,7 @@ AC_CONFIG_FILES([ src/libcharon/plugins/load_tester/Makefile src/libcharon/plugins/resolve/Makefile src/libcharon/plugins/attr/Makefile + src/libcharon/plugins/attr_sql/Makefile src/stroke/Makefile src/ipsec/Makefile src/starter/Makefile diff --git a/src/libcharon/Makefile.am b/src/libcharon/Makefile.am index 5df7dbbf3..0384064fb 100644 --- a/src/libcharon/Makefile.am +++ b/src/libcharon/Makefile.am @@ -644,3 +644,10 @@ if MONOLITHIC libcharon_la_LIBADD += plugins/attr/libstrongswan-attr.la endif endif + +if USE_ATTR_SQL + SUBDIRS += plugins/attr_sql +if MONOLITHIC + libcharon_la_LIBADD += plugins/attr_sql/libstrongswan-attr-sql.la +endif +endif diff --git a/src/libhydra/plugins/attr_sql/Makefile.am b/src/libcharon/plugins/attr_sql/Makefile.am similarity index 85% rename from src/libhydra/plugins/attr_sql/Makefile.am rename to src/libcharon/plugins/attr_sql/Makefile.am index 6e7eae5eb..5d89e67cb 100644 --- a/src/libhydra/plugins/attr_sql/Makefile.am +++ b/src/libcharon/plugins/attr_sql/Makefile.am @@ -1,6 +1,7 @@ AM_CPPFLAGS = \ -I$(top_srcdir)/src/libstrongswan \ - -I$(top_srcdir)/src/libhydra + -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libcharon AM_CFLAGS = \ $(PLUGIN_CFLAGS) diff --git a/src/libhydra/plugins/attr_sql/attr_sql_plugin.c b/src/libcharon/plugins/attr_sql/attr_sql_plugin.c similarity index 100% rename from src/libhydra/plugins/attr_sql/attr_sql_plugin.c rename to src/libcharon/plugins/attr_sql/attr_sql_plugin.c diff --git a/src/libhydra/plugins/attr_sql/attr_sql_plugin.h b/src/libcharon/plugins/attr_sql/attr_sql_plugin.h similarity index 98% rename from src/libhydra/plugins/attr_sql/attr_sql_plugin.h rename to src/libcharon/plugins/attr_sql/attr_sql_plugin.h index ba85a6b28..ef71492f3 100644 --- a/src/libhydra/plugins/attr_sql/attr_sql_plugin.h +++ b/src/libcharon/plugins/attr_sql/attr_sql_plugin.h @@ -15,7 +15,7 @@ /** * @defgroup attr_sql attr_sql - * @ingroup hplugins + * @ingroup cplugins * * @defgroup sql_plugin sql_plugin * @{ @ingroup attr_sql diff --git a/src/libhydra/plugins/attr_sql/sql_attribute.c b/src/libcharon/plugins/attr_sql/sql_attribute.c similarity index 100% rename from src/libhydra/plugins/attr_sql/sql_attribute.c rename to src/libcharon/plugins/attr_sql/sql_attribute.c diff --git a/src/libhydra/plugins/attr_sql/sql_attribute.h b/src/libcharon/plugins/attr_sql/sql_attribute.h similarity index 100% rename from src/libhydra/plugins/attr_sql/sql_attribute.h rename to src/libcharon/plugins/attr_sql/sql_attribute.h diff --git a/src/libhydra/Makefile.am b/src/libhydra/Makefile.am index 1877a0bfa..e1537c1fb 100644 --- a/src/libhydra/Makefile.am +++ b/src/libhydra/Makefile.am @@ -37,13 +37,6 @@ else SUBDIRS = . endif -if USE_ATTR_SQL - SUBDIRS += plugins/attr_sql -if MONOLITHIC - libhydra_la_LIBADD += plugins/attr_sql/libstrongswan-attr-sql.la -endif -endif - if USE_KERNEL_PFKEY SUBDIRS += plugins/kernel_pfkey if MONOLITHIC diff --git a/src/pool/Makefile.am b/src/pool/Makefile.am index b8d662e57..5ae624b88 100644 --- a/src/pool/Makefile.am +++ b/src/pool/Makefile.am @@ -11,11 +11,13 @@ pool.o : $(top_builddir)/config.status AM_CPPFLAGS = \ -I$(top_srcdir)/src/libstrongswan \ -I$(top_srcdir)/src/libhydra \ + -I$(top_srcdir)/src/libcharon \ -DPLUGINS=\""${pool_plugins}\"" pool_LDADD = \ $(top_builddir)/src/libstrongswan/libstrongswan.la \ - $(top_builddir)/src/libhydra/libhydra.la + $(top_builddir)/src/libhydra/libhydra.la \ + $(top_builddir)/src/libcharon/libcharon.la endif USE_ATTR_SQL