diff --git a/ChangeLog b/ChangeLog index 2b23528ae..cc49dcf5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-09-25 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoLDAPUserDefaults.[hm]: new class module + designed to substitute the system NSUserDefaults system with + access to an LDAP directory. + 2008-09-22 Wolfgang Sourdeau * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder diff --git a/Main/sogod.m b/Main/sogod.m index 8c13c0386..2898f7a44 100644 --- a/Main/sogod.m +++ b/Main/sogod.m @@ -28,6 +28,10 @@ #import +#if defined(LDAP_CONFIG) +#import +#endif + int main (int argc, char **argv, char **env) { @@ -38,6 +42,10 @@ main (int argc, char **argv, char **env) pool = [NSAutoreleasePool new]; +#if defined(LDAP_CONFIG) + [SOGoLDAPUserDefaults poseAsClass: [NSUserDefaults class]]; +#endif + rc = -1; if (getuid() > 0) diff --git a/SoObjects/SOGo/GNUmakefile b/SoObjects/SOGo/GNUmakefile index 32dbffef3..2aaf6e438 100644 --- a/SoObjects/SOGo/GNUmakefile +++ b/SoObjects/SOGo/GNUmakefile @@ -106,6 +106,11 @@ SOGo_OBJC_FILES = \ SOGo_RESOURCE_FILES = \ DAVReportMap.plist +ifeq ($(ldap_config),yes) +SOGo_OBJC_FILES += SOGoLDAPUserDefaults.m +SOGo_HEADER_FILES += SOGoLDAPUserDefaults.h +endif + # tools sogo_email2uid_OBJC_FILES += sogo_email2uid.m diff --git a/SoObjects/SOGo/SOGoLDAPUserDefaults.h b/SoObjects/SOGo/SOGoLDAPUserDefaults.h new file mode 100644 index 000000000..bc20dcdd8 --- /dev/null +++ b/SoObjects/SOGo/SOGoLDAPUserDefaults.h @@ -0,0 +1,27 @@ +/* SOGoLDAPUserDefaults.h - this file is part of SOGo + * + * Copyright (C) 2008 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#import + +@interface SOGoLDAPUserDefaults : NSUserDefaults + +@end diff --git a/SoObjects/SOGo/SOGoLDAPUserDefaults.m b/SoObjects/SOGo/SOGoLDAPUserDefaults.m new file mode 100644 index 000000000..f7071c937 --- /dev/null +++ b/SoObjects/SOGo/SOGoLDAPUserDefaults.m @@ -0,0 +1,27 @@ +/* SOGoLDAPUserDefaults.m - this file is part of SOGo + * + * Copyright (C) 2008 Inverse groupe conseil + * + * Author: Wolfgang Sourdeau + * + * This file is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; see the file COPYING. If not, write to + * the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#import "SOGoLDAPUserDefaults.h" + +@implementation SOGoLDAPUserDefaults + +@end diff --git a/configure b/configure index 57817e033..92a300f92 100755 --- a/configure +++ b/configure @@ -18,6 +18,7 @@ ARG_GSMAKE=`gnustep-config --variable=GNUSTEP_MAKEFILES 2>/dev/null` ARG_CFGMAKE="$PWD/config.make" ARG_WITH_DEBUG=1 ARG_WITH_STRIP=1 +ARG_WITH_LDAP_CONFIG=0 GNUSTEP_INSTALLATION_DOMAIN="LOCAL" @@ -58,6 +59,8 @@ Installation directories: --enable-debug turn on debugging and compile time warnings --enable-strip turn on stripping of debug symbols + --enable-ldap-config enable LDAP based configuration of SOGo + _ACEOF exit 0; @@ -265,7 +268,11 @@ genConfigMake() { done cfgwrite "LIBRARY_COMBO=$LIBRARY_COMBO" cfgwrite "" - + + if test $ARG_WITH_LDAP_CONFIG = 1; then + cfgwrite "ADDITIONAL_CPPFLAGS += -DLDAP_CONFIG=1" + cfgwrite "ldap_config:=yes" + fi } checkLinking() { @@ -373,6 +380,13 @@ processOption() { ARG_WITH_STRIP=0 ;; + "x--enable-ldap-config") + ARG_WITH_LDAP_CONFIG=1 + ;; + "x--disable-ldap-config") + ARG_WITH_LDAP_CONFIG=0 + ;; + *) echo "error: cannot process argument: $1"; exit 1; ;; esac }