anchor.diff:  
   inherit autotools
   
  -# OPTIONS
  -# The following two variables can be set in a distro or local.conf
  -# to switch features on.  Each feature foo defines OPENLDAP_OPTION_foo
  -# and OPENLDAP_DEPENDS_foo in this file - to include feature foo add
  -# the two variables into the setting of the options below (please use
  -# += because that means this can be done in *both* distro.conf and
  -# local.conf!
  -OPENLDAP_OPTIONS ?= ""
  -OPENLDAP_DEPENDS ?= ""
  -
   # CV SETTINGS
   # Required to work round AC_FUNC_MEMCMP which gets the wrong answer
   # when cross compiling (should be in site?)
  
positive.code: EXTRA_OECONF += "--with-yielding-select=yes"
  # Shared libraries are nice...
  EXTRA_OECONF += "--enable-dynamic"
  #
  # Disable TLS to remove the need for openssl/libcrypto
  OPENLDAP_OPTION_tls  ?= "--with-tls"
  # set the following to "openssl" to build tls support
  OPENLDAP_DEPENDS_tls ?= "gnutls"
  EXTRA_OECONF += "${OPENLDAP_OPTION_tls}"
  DEPENDS += "${OPENLDAP_DEPENDS_tls}"
  #
  # Disable Cyrus SASL, which may or may not be working at present...
  OPENLDAP_OPTION_sasl  ?= "--without-cyrus-sasl"
  # set the following to "cyrus-sasl" to build SASL support
  OPENLDAP_DEPENDS_sasl ?= ""
  EXTRA_OECONF += "${OPENLDAP_OPTION_sasl}"
  DEPENDS += "${OPENLDAP_DEPENDS_sasl}"
  
  # SLAPD options
  #
  # UNIX crypt(3) passwd support:
  EXTRA_OECONF += "--enable-crypt"
  #
  # Enable dynamic module loading.  If this is *disabled* the
  # dependency on libtool is removed (to disable set the following
  # to variables to "" in a .conf file).
  OPENLDAP_OPTION_modules += "lt_cv_dlopen_self=yes --enable-modules"
  OPENLDAP_DEPENDS_modules += "libtool"
  EXTRA_OECONF += " ${OPENLDAP_OPTION_modules}"
  DEPENDS += "${OPENLDAP_DEPENDS_modules}"
  
  # SLAPD BACKEND
  #
  
negative.code: #--enable-bdb          enable Berkeley DB backend no|yes|mod yes
  # The Berkely DB is the standard choice.  This version of OpenLDAP requires
  # the version 4 implementation or better.
  PACKAGECONFIG[bdb] = "--enable-bdb=mod,--enable-bdb=no,db"
  
  #--enable-dnssrv       enable dnssrv backend no|yes|mod no
  PACKAGECONFIG[dnssrv] = "--enable-dnssrv=mod,--enable-dnssrv=no"
  
  #--enable-hdb          enable Hierarchical DB backend no|yes|mod no
  # This forces ldbm to use Berkeley too, remove to use gdbm
  PACKAGECONFIG[hdb] = "--enable-hdb=mod,--enable-hdb=no,db"
  
  #--enable-ldap         enable ldap backend no|yes|mod no
  PACKAGECONFIG[ldap] = "--enable-ldap=mod,--enable-ldap=no,"
  
  #--enable-ldbm         enable ldbm backend no|yes|mod no
  # ldbm requires further specification of the underlying database API, because
  # bdb is enabled above this must be set to berkeley, however the config
  # defaults this correctly so --with-ldbm-api is *not* set.  The build will
  # fail if bdb is removed, but no database is built to provide the
  # support for ldbm
  # guide.html:<P>back-ldbm was both slow and unreliable. Its byzantine indexing code was prone to spontaneous corruption, as were the underlying database libraries that were commonly used (e.g. GDBM or NDBM). back-bdb and back-hdb are superior in every aspect, with simplified indexing to avoid index corruption, fine-grained locking for greater concurrency, hierarchical caching for greater performance, streamlined on-disk format for greater efficiency and portability, and full transaction support for greater reliability.</P>
  # configure: WARNING: unrecognized options: --disable-silent-rules, --enable-ldbm, --with-ldbm-api
  #PACKAGECONFIG[ldbm] = "--enable-ldbm=mod --with-ldbm-api=gdbm,--enable-ldbm-no,gdbm"
  
  #--enable-meta         enable metadirectory backend no|yes|mod no
  PACKAGECONFIG[meta] = "--enable-meta=mod,--enable-meta=no,"
  
  #--enable-monitor      enable monitor backend no|yes|mod yes
  PACKAGECONFIG[monitor] = "--enable-monitor=mod,--enable-monitor=no,"
  
  #--enable-null         enable null backend no|yes|mod no
  PACKAGECONFIG[null] = "--enable-null=mod,--enable-null=no,"
  
  #--enable-passwd       enable passwd backend no|yes|mod no
  PACKAGECONFIG[passwd] = "--enable-passwd=mod,--enable-passwd=no,"
  
  #--enable-perl         enable perl backend no|yes|mod no
  #  This requires a loadable perl dynamic library, if enabled without
  #  doing something appropriate (building perl?) the build will pick
  #  up the build machine perl - not good (inherit perlnative?)
  PACKAGECONFIG[perl] = "--enable-perl=mod,--enable-perl=no,perl"
  
  #--enable-shell        enable shell backend no|yes|mod no
  # configure: WARNING: Use of --without-threads is recommended with back-shell
  PACKAGECONFIG[shell] = "--enable-shell=mod --without-threads,--enable-shell=no,"
  
  #--enable-sql          enable sql backend no|yes|mod no
  # sql requires some sql backend which provides sql.h, sqlite* provides
  # sqlite.h (which may be compatible but hasn't been tried.)
  PACKAGECONFIG[sql] = "--enable-sql=mod,--enable-sql=no,sqlite3"
  
  #--enable-dyngroup     Dynamic Group overlay no|yes|mod no
  #  This is a demo, Proxy Cache defines init_module which conflicts with the
  #  same symbol in dyngroup
  PACKAGECONFIG[dyngroup] = "--enable-dyngroup=mod,--enable-dyngroup=no,"
  
  #--enable-proxycache   Proxy Cache overlay no|yes|mod no
  PACKAGECONFIG[proxycache] = "--enable-proxycache=mod,--enable-proxycache=no,"
  FILES_${PN}-overlay-proxycache = "${md}/pcache-*.so.*"
  PACKAGES += "${PN}-overlay-proxycache"
  
  CPPFLAGS_append = " -D_GNU_SOURCE"
  
  