From 157e66ad4f57cac2db87036f25ad03fdcdd494b0 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 1 Nov 2012 11:28:45 -0400 Subject: [PATCH] added "--enable-saml2" configuration option and dependency on liblasso --- SoObjects/SOGo/GNUmakefile | 11 +++++++---- SoObjects/SOGo/GNUmakefile.preamble | 4 ++++ UI/MainUI/GNUmakefile | 5 ++++- configure | 20 +++++++++++++++++++- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/SoObjects/SOGo/GNUmakefile b/SoObjects/SOGo/GNUmakefile index e79dccf6e..158d40732 100644 --- a/SoObjects/SOGo/GNUmakefile +++ b/SoObjects/SOGo/GNUmakefile @@ -53,7 +53,6 @@ SOGo_HEADER_FILES = \ SOGoAuthenticator.h \ SOGoSession.h \ SOGoCASSession.h \ - SOGoSAML2Session.h \ SOGoDAVAuthenticator.h \ SOGoProxyAuthenticator.h \ SOGoWebAuthenticator.h \ @@ -123,7 +122,6 @@ SOGo_OBJC_FILES = \ \ SOGoSession.m \ SOGoCASSession.m \ - SOGoSAML2Session.m \ SOGoDAVAuthenticator.m \ SOGoProxyAuthenticator.m \ SOGoWebAuthenticator.m \ @@ -142,8 +140,13 @@ SOGo_OBJC_FILES = \ SOGo_RESOURCE_FILES = \ SOGoDefaults.plist \ - DAVReportMap.plist \ - SOGoSAML2Metadata.xml + DAVReportMap.plist + +ifeq ($(saml2_config), yes) + SOGo_HEADER_FILES += SOGoSAML2Session.h + SOGo_OBJC_FILES += SOGoSAML2Session.m + SOGo_RESOURCE_FILES += SOGoSAML2Metadata.xml +endif ifeq ($(ldap_config),yes) diff --git a/SoObjects/SOGo/GNUmakefile.preamble b/SoObjects/SOGo/GNUmakefile.preamble index 6e01a3b92..85d69a994 100644 --- a/SoObjects/SOGo/GNUmakefile.preamble +++ b/SoObjects/SOGo/GNUmakefile.preamble @@ -36,6 +36,10 @@ SOGo_LIBRARIES_DEPEND_UPON += -lcrypto endif endif +ifeq ($(HAS_LIBRARY_lasso), yes) +SOGo_LIBRARIES_DEPEND_UPON += -llasso +endif + ifeq ($(findstring openbsd, $(GNUSTEP_HOST_OS)), openbsd) SOGo_LIBRARIES_DEPEND_UPON += -lcrypto else diff --git a/UI/MainUI/GNUmakefile b/UI/MainUI/GNUmakefile index c61968743..0f24566ba 100644 --- a/UI/MainUI/GNUmakefile +++ b/UI/MainUI/GNUmakefile @@ -13,9 +13,12 @@ MainUI_OBJC_FILES += \ SOGoRootPage.m \ SOGoUserHomePage.m \ SOGoBrowsersPanel.m \ - SOGoSAML2Actions.m \ UIxLoading.m \ +ifeq ($(saml2_config), yes) + MainUI_OBJC_FILES += SOGoSAML2Actions.m +endif + MainUI_RESOURCE_FILES += \ product.plist \ SOGoProfile.sql \ diff --git a/configure b/configure index 3b54788f4..9d0e8b801 100755 --- a/configure +++ b/configure @@ -24,6 +24,7 @@ ARG_CFGMAKE="$PWD/config.make" ARG_CFGSSL="auto" ARG_WITH_DEBUG=1 ARG_WITH_STRIP=0 +ARG_ENABLE_SAML2=0 ARG_WITH_LDAP_CONFIG=0 GNUSTEP_INSTALLATION_DOMAIN="LOCAL" @@ -74,6 +75,7 @@ Installation directories: --enable-debug turn on debugging and compile time warnings --enable-strip turn on stripping of debug symbols --with-ssl=SSL specify ssl library (none, libssl, gnutls, auto) [auto] + --enable-saml2 enable support for SAML2 authentication (requires liblasso) --enable-ldap-config enable LDAP based configuration of SOGo @@ -99,6 +101,11 @@ printParas() { else echo " strip: no"; fi + if test $ARG_ENABLE_SAML2 = 1; then + echo " saml2 support: yes"; + else + echo " saml2 support: no"; + fi if test $ARG_WITH_LDAP_CONFIG = 1; then echo " ldap-based configuration: yes"; else @@ -296,10 +303,15 @@ genConfigMake() { cfgwrite "LIBRARY_COMBO=$LIBRARY_COMBO" cfgwrite "" + if test $ARG_ENABLE_SAML2 = 1; then + cfgwrite "ADDITIONAL_CPPFLAGS += -DSAML2_CONFIG=1" + cfgwrite "saml2_config:=yes" + fi + if test $ARG_WITH_LDAP_CONFIG = 1; then cfgwrite "ADDITIONAL_CPPFLAGS += -DLDAP_CONFIG=1" cfgwrite "ldap_config:=yes" - fi + fi cfgwrite "include \$(TOPDIR)/general.make" } @@ -363,6 +375,9 @@ EOF } checkDependencies() { + if test "x$ARG_ENABLE_SAML2" = "x1"; then + checkLinking "lasso" required; + fi if test "x$ARG_CFGSSL" = "xauto"; then checkLinking "ssl" optional; if test $? != 0; then @@ -451,6 +466,9 @@ processOption() { extractFuncValue $1; ARG_CFGSSL="$VALUE" ;; + "x--enable-saml2") + ARG_ENABLE_SAML2=1 + ;; "x--enable-ldap-config") ARG_WITH_LDAP_CONFIG=1