aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2014-10-08 13:44:44 +0200
committerMartin Willi <martin@revosec.ch>2014-10-10 11:42:17 +0200
commit409f1fc144f47e12f1d8644382d41c5c12482f1b (patch)
tree814d4298db49a3bdd96f66716f9d0ecc39141cb5
parent1038d96537049072c2558b083306d308b04f1d63 (diff)
downloadstrongswan-409f1fc144f47e12f1d8644382d41c5c12482f1b.tar.bz2
strongswan-409f1fc144f47e12f1d8644382d41c5c12482f1b.tar.xz
configure: Add global --enable-ruby-gems and --with-rubygemdir options
This provides the options to build and install ruby gems for components providing them, such as vici.
-rw-r--r--configure.ac14
1 files changed, 14 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 2ea3742d0..01951709f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -68,6 +68,7 @@ ARG_WITH_SET([capabilities], [no], [set capability dropping library. Cur
ARG_WITH_SET([mpz_powm_sec], [yes], [use the more side-channel resistant mpz_powm_sec in libgmp, if available])
ARG_WITH_SET([dev-headers], [no], [install strongSwan development headers to directory.])
ARG_WITH_SET([printf-hooks], [auto], [force the use of a specific printf hook implementation (auto, builtin, glibc, vstr).])
+ARG_WITH_SET([rubygemdir], ["gem environment gemdir"], [path to install ruby gems to])
if test -n "$PKG_CONFIG"; then
systemdsystemunitdir_default=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
@@ -285,6 +286,7 @@ ARG_ENABL_SET([integrity-test], [enable integrity testing of libstrongswan and p
ARG_DISBL_SET([load-warning], [disable the charon plugin load option warning in starter.])
ARG_ENABL_SET([mediation], [enable IKEv2 Mediation Extension.])
ARG_ENABL_SET([unwind-backtraces],[use libunwind to create backtraces for memory leaks and segfaults.])
+ARG_ENABL_SET([ruby-gems], [enable installation of provided ruby gems.])
# compile options
ARG_ENABL_SET([coverage], [enable lcov coverage report generation.])
ARG_ENABL_SET([leak-detective], [enable malloc hooks to find memory leaks.])
@@ -1152,6 +1154,17 @@ if test x$coverage = xtrue; then
CFLAGS="${CFLAGS} -g -O0"
fi
+if test x$ruby_gems = xtrue; then
+ AC_PATH_PROG([GEM], [gem], [], [$PATH:/bin:/usr/bin:/usr/local/bin])
+ if test x$GEM = x; then
+ AC_MSG_ERROR(RubyGems package manager not found)
+ fi
+ if test "x$rubygemdir" = "xgem environment gemdir"; then
+ rubygemdir=$($GEM environment gemdir)
+ fi
+ AC_SUBST(RUBYGEMDIR, "$rubygemdir")
+fi
+
# ===============================================
# collect plugin list for strongSwan components
# ===============================================
@@ -1511,6 +1524,7 @@ AM_CONDITIONAL(USE_SWANCTL, test x$swanctl = xtrue)
AM_CONDITIONAL(USE_SVC, test x$svc = xtrue)
AM_CONDITIONAL(USE_SYSTEMD, test x$systemd = xtrue)
AM_CONDITIONAL(USE_LEGACY_SYSTEMD, test -n "$systemdsystemunitdir" -a "x$systemdsystemunitdir" != xno)
+AM_CONDITIONAL(USE_RUBY_GEMS, test x$ruby_gems = xtrue)
# ========================
# set global definitions