found this on the macosx-admin@omnigroup.com mailing list:
-------
On Monday, December 11, 2000, at 02:41 AM, Martin Ott wrote:
> Has anybody successfully compiled and set up OpenLDAP on Darwin or Mac OS X?
I managed to get OpenLDAP to compile, but I wasn't able to get populate the database. I'm sure it's only a matter of more fiddling, but my supply of free time dried up. Below is a Makefile that makes the build process painless. It was given to me by Luke Howard.
To use it, unpack the OpenLDAP distribution into a directory called 'ldap' and put the make file in the same directory as the 'ldap' directory. (ie, not with the ldap sources, but one level up). If your cc doesn't support fat binaries, (as is the case with the OSXPB Developer Tools) you'll need to modify /Developer/Makefiles/CoreOS/ReleaseControl/Common.make: change the line that reads
RC_ARCHS = ppc i386
to
RC_ARCHS = ppc
Otherwise you try to build for intel as well, and it don't work.
Have fun! If you figure out how to get data into the directory, please let me know.
Colin
##
# Makefile for OpenLDAP
##
# Luke Howard, lukeh@darwin.apple.com
##
RC_JASPER = YES
DEBUG = YES
# Project info
Project = ldap
ProjectName = OpenLDAP
UserType = Administrator
ToolType = Services
GnuNoBuild = YES
Extra_LD_Flags =
Extra_CC_Flags = -fno-common
Extra_Configure_Flags = --enable-shared
Extra_Install_Flags = sysconfdir="$(DSTROOT)$(ETCDIR)/openldap" \
localstatedir="$(DSTROOT)$(VARDIR)" \
includedir="$(DSTROOT)/$(USRINCLUDEDIR)"
Extra_Configure_Flags += --localstatedir=$(VARDIR) --sysconfdir=$(ETCDIR)
#Extra_Configure_Flags += --with-tls
#Extra_LD_Libraries += -framework openssl
# comment out if you're not building back-netinfo;
# make sure you've installed Services/netinfo/common
# headers and library into /AppleInternal/Developer
NetInfoBackend = NO
ifeq ($(NetInfoBackend),YES)
Extra_LD_Flags += -all_load
Extra_CC_Flags += -I/AppleInternal/Developer/Headers
Extra_LD_Libraries += -L/AppleInternal/Developer/Libraries -lcommon
Extra_Configure_Flags += --enable-netinfo --program-transform-name="s/^sl/ni-sl/"
endif
#GnuAfterInstall = install-startup-item
# It's a GNU Source project
include $(MAKEFILEPATH)/CoreOS/ReleaseControl/GNUSource.make
Install_Target = install
build:: configure
@echo "Building $(Project)..."
$(_v) $(MAKE) -C $(BuildDirectory)
#StartupItemDir = $(NSLIBRARYDIR)/StartupItems/LDAP
#
#install-startup-item:
# $(_v) $(INSTALL_DIRECTORY) $(DSTROOT)$(StartupItemDir)
# $(_v) $(INSTALL_SCRIPT) -c startup.script $(DSTROOT)$(StartupItemDir)/LDAP
# $(_v) $(INSTALL_FILE) -c startup.plist $(DSTROOT)$(StartupItemDir)/StartupParameters.plist
_______________________________________________
MacOSX-admin mailing list
MacOSX-admin@omnigroup.com
http://www.omnigroup.com/mailman/listinfo/macosx-admin