aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-07-11 11:16:31 +0200
committerMartin Willi <martin@revosec.ch>2012-07-11 11:16:31 +0200
commitb188f23199293951138f05f0604a123c3437b6f1 (patch)
treef584ba1b9d0eac8789835774fbcfc9da5f0f8ba6
parent2a6bcbbdee4935602ff04612c145e7633467733f (diff)
downloadstrongswan-b188f23199293951138f05f0604a123c3437b6f1.tar.bz2
strongswan-b188f23199293951138f05f0604a123c3437b6f1.tar.xz
Install dev headers only if --with-dev-headers= option is set
-rw-r--r--Makefile.am2
-rw-r--r--configure.in4
-rw-r--r--src/libfast/Makefile.am4
-rw-r--r--src/libstrongswan/Makefile.am4
-rw-r--r--src/libtls/Makefile.am4
5 files changed, 15 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index b236f7667..908afca44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -11,8 +11,10 @@ CLEANFILES = Doxyfile
BUILT_SOURCES = Android.mk
MAINTAINERCLEANFILES = Android.mk
+if USE_DEV_HEADERS
config_includedir = $(ipseclibdir)/include
nodist_config_include_HEADERS = config.h
+endif
Android.mk : Android.mk.in configure.in
sed \
diff --git a/configure.in b/configure.in
index fc96929f5..79ede656d 100644
--- a/configure.in
+++ b/configure.in
@@ -46,6 +46,7 @@ ARG_WITH_SUBST([ipsec-script], [ipsec], [change the name of the ipsec scri
ARG_WITH_SET([capabilities], [no], [set capability dropping library. Currently supported values are "libcap" and "native"])
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.])
if test -n "$PKG_CONFIG"; then
systemdsystemunitdir_default=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)
@@ -784,6 +785,9 @@ if test x$integrity_test = xtrue; then
)
fi
+AM_CONDITIONAL(USE_DEV_HEADERS, [test "x$dev_headers" != xno])
+AC_SUBST(dev_headers)
+
CFLAGS="$CFLAGS -include `pwd`/config.h"
dnl ==============================================
diff --git a/src/libfast/Makefile.am b/src/libfast/Makefile.am
index 54f449167..df5b650ce 100644
--- a/src/libfast/Makefile.am
+++ b/src/libfast/Makefile.am
@@ -3,9 +3,11 @@ ipseclib_LTLIBRARIES = libfast.la
libfast_la_SOURCES = \
dispatcher.c request.c session.c smtp.c
-fast_includedir = $(includedir)/strongswan/fast
+if USE_DEV_HEADERS
+fast_includedir = ${dev_headers}/fast
nobase_fast_include_HEADERS = \
context.h controller.h dispatcher.h filter.h request.h session.h smtp.h
+endif
libfast_la_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la \
-lfcgi $(clearsilver_LIBS) $(PTHREADLIB)
diff --git a/src/libstrongswan/Makefile.am b/src/libstrongswan/Makefile.am
index 1b7e93aa5..b319d0204 100644
--- a/src/libstrongswan/Makefile.am
+++ b/src/libstrongswan/Makefile.am
@@ -26,7 +26,8 @@ utils.c utils/host.c utils/identification.c utils/lexparser.c \
utils/linked_list.c utils/hashtable.c utils/enumerator.c utils/optionsfrom.c \
utils/capabilities.c utils/backtrace.c
-strongswan_includedir = $(includedir)/strongswan
+if USE_DEV_HEADERS
+strongswan_includedir = ${dev_headers}
nobase_strongswan_include_HEADERS = \
library.h chunk.h debug.h enum.h settings.h printf_hook.h \
asn1/asn1.h asn1/asn1_parser.h asn1/oid.h bio/bio_reader.h bio/bio_writer.h \
@@ -58,6 +59,7 @@ threading/spinlock.h threading/semaphore.h threading/rwlock.h \
threading/lock_profiler.h utils.h utils/host.h utils/identification.h \
utils/lexparser.h utils/linked_list.h utils/hashtable.h utils/enumerator.h \
utils/optionsfrom.h utils/capabilities.h utils/backtrace.h
+endif
library.lo : $(top_builddir)/config.status
diff --git a/src/libtls/Makefile.am b/src/libtls/Makefile.am
index ee28d8891..772950606 100644
--- a/src/libtls/Makefile.am
+++ b/src/libtls/Makefile.am
@@ -7,8 +7,10 @@ libtls_la_SOURCES = \
tls_crypto.c tls_prf.c tls_socket.c tls_eap.c tls_cache.c tls_peer.c \
tls_server.c tls.c
-tls_includedir = $(includedir)/strongswan/tls
+if USE_DEV_HEADERS
+tls_includedir = ${dev_headers}/tls
nobase_tls_include_HEADERS = \
tls_protection.h tls_compression.h tls_fragmentation.h tls_alert.h \
tls_crypto.h tls_prf.h tls_socket.h tls_eap.h tls_cache.h tls_peer.h \
tls_server.h tls_handshake.h tls_application.h tls.h
+endif