aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2008-04-07 06:56:33 +0000
committerMartin Willi <martin@strongswan.org>2008-04-07 06:56:33 +0000
commitff867d062efe6f51ac32a3231d998fb2e460ce6b (patch)
treeaa01e95d8e7844c0ad375f4c0386bc8f20a9798c
parent4071ad1e5b7aff9e823ed4faa5fd3fe74f033886 (diff)
downloadstrongswan-ff867d062efe6f51ac32a3231d998fb2e460ce6b.tar.bz2
strongswan-ff867d062efe6f51ac32a3231d998fb2e460ce6b.tar.xz
added ./configure option --with-strongswan-conf=
defaults to /etc/strongswan.conf
-rw-r--r--configure.in7
-rw-r--r--src/charon/daemon.c2
-rw-r--r--src/libstrongswan/fips/fips_signer.c2
-rw-r--r--src/manager/main.c2
-rw-r--r--src/openac/Makefile.am1
-rwxr-xr-xsrc/openac/openac.c2
6 files changed, 11 insertions, 5 deletions
diff --git a/configure.in b/configure.in
index 8a7f17154..9e0de9cd4 100644
--- a/configure.in
+++ b/configure.in
@@ -53,6 +53,13 @@ AC_ARG_WITH(
)
AC_ARG_WITH(
+ [strongswan-conf],
+ AS_HELP_STRING([--with-strongswan-conf=file],[strongswan.conf file other than "sysconfdir/strongswan.conf"]),
+ [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "$withval")],
+ [AC_DEFINE_UNQUOTED(STRONGSWAN_CONF, "${sysconfdir}/strongswan.conf")]
+)
+
+AC_ARG_WITH(
[urandom-device],
AS_HELP_STRING([--with-urandom-device=dev],[set the device for pseudo random data other than "/dev/urandom"]),
[AC_DEFINE_UNQUOTED(DEV_URANDOM, "$withval")],
diff --git a/src/charon/daemon.c b/src/charon/daemon.c
index 12fc2061a..689bad9fe 100644
--- a/src/charon/daemon.c
+++ b/src/charon/daemon.c
@@ -486,7 +486,7 @@ int main(int argc, char *argv[])
dbg = dbg_silent;
/* initialize library */
- library_init(IPSEC_DIR "/strongswan.conf");
+ library_init(STRONGSWAN_CONF);
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
lib->printf_hook->add_handler(lib->printf_hook, 'R',
traffic_selector_get_printf_hooks());
diff --git a/src/libstrongswan/fips/fips_signer.c b/src/libstrongswan/fips/fips_signer.c
index 276e55e5b..a458c1674 100644
--- a/src/libstrongswan/fips/fips_signer.c
+++ b/src/libstrongswan/fips/fips_signer.c
@@ -27,7 +27,7 @@ int main(int argc, char* argv[])
char hmac_signature[BUF_LEN];
/* initialize library */
- library_init(IPSEC_DIR "/strongswan.conf");
+ library_init(STRONGSWAN_CONF);
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
if (!fips_compute_hmac_signature(hmac_key, hmac_signature))
diff --git a/src/manager/main.c b/src/manager/main.c
index 981f92f42..03a9f5807 100644
--- a/src/manager/main.c
+++ b/src/manager/main.c
@@ -36,7 +36,7 @@ int main (int arc, char *argv[])
bool debug;
int threads, timeout;
- library_init(IPSECDIR "/strongswan.conf");
+ library_init(STRONGSWAN_CONF);
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
socket = lib->settings->get_str(lib->settings, "manager.socket", NULL);
diff --git a/src/openac/Makefile.am b/src/openac/Makefile.am
index 433fe51bf..84f2d646d 100644
--- a/src/openac/Makefile.am
+++ b/src/openac/Makefile.am
@@ -4,7 +4,6 @@ dist_man_MANS = openac.8
INCLUDES = -I$(top_srcdir)/src/libstrongswan
AM_CFLAGS = -DIPSEC_CONFDIR=\"${confdir}\" \
- -DIPSEC_DIR=\"${ipsecdir}\" \
-DIPSEC_PLUGINDIR=\"${plugindir}\"
openac_LDADD = $(top_builddir)/src/libstrongswan/libstrongswan.la -lgmp
diff --git a/src/openac/openac.c b/src/openac/openac.c
index b79f4cdc0..b16b53b0b 100755
--- a/src/openac/openac.c
+++ b/src/openac/openac.c
@@ -267,7 +267,7 @@ int main(int argc, char **argv)
openlog("openac", 0, LOG_AUTHPRIV);
/* initialize library */
- library_init(IPSEC_DIR "/strongswan.conf");
+ library_init(STRONGSWAN_CONF);
lib->plugins->load(lib->plugins, IPSEC_PLUGINDIR, "libstrongswan-");
/* initialize optionsfrom */