[PATCH] static-linked plugin support for shared library build

Takashi HOSHINO hoshino at labs.cybozu.co.jp
Tue Dec 8 22:40:17 EST 2009


Hello,

We created a patch to enable selection of shared sasl library build
with static-linked plugins.
The patch is separated into three files for convenience:
  1-static-plugin-autotools.patch
  2-static-plugin-nmake.patch
  3-deleting-build-warnings.patch

We hope the patch will be merged to the official distribution.
The following contents are the detail description of the patch.

********************************************************************************
* Changes
********************************************************************************

* Added --enable-staticplugin option for configure script.
* Added SASLDB, SASL_DB_PATH, and STATIC_PLUGIN options
  for nmake build on Windows.
* Fixed to delete several build warnings.


********************************************************************************
* Status
********************************************************************************

* Verified build target:
  Linux 32bit/64bit and Windows 32bit/64bit.

  Test environment:
    Windows: Windows server 2008 standard SP1 64bit
             with Visual Studio 2008 SP
    Linux:   CentOS 5.3 64bit with gcc-4.3.4

* Verified plugins:
  anonymous, plain, login, cram-md5, digest-md5, ntlm.


********************************************************************************
* How to build
********************************************************************************

****************************************
* Build on Linux
****************************************

1. Extract source archive and apply the patch files.

  > tar xzf cyrus-sasl-2.1.24rc1.tar.gz
  > cd cyrus-sasl.2.1.24
  > patch -p1 < ../1-static-plugin-autotools.patch
  > patch -p1 < ../2-static-plugin-nmake.patch
  > patch -p1 < ../3-deleting-build-warnings.patch

2. Rebuild configure script.

  On the top directory of source tree:
  > rm -rf autom4te.cache
  >
  > aclocal -I cmulocal -I config
  > autoheader
  > automake -c -f -a
  > autoconf
  >
  > cd saslauthd
  > aclocal -I ../cmulocal -I ../config
  > autoheader
  > automake -c -f -a
  > autoconf
  > cd ..

3. Run configure script to create Makefile

  > ./configure --enable-staticplugin

4. Build the library and plugins.

  > make

****************************************
* Build on Windows (with nmake)
****************************************

1. Extract source archive and apply the patch files.

  Do the equivalent operation as the linux build.

2. Open Visual Studio Command Line Prompt

  Run the following command to select your required compiler:
  for 32bit build,
  > "%VCINSTALLDIR%\vcvarsall.bat" x86
  for 64bit build,
  > "%VCINSTALLDIR%\vcvarsall.bat" amd64

3. Build the library and plugins.

  On the top directory of source tree:
  > nmake -f NTMakefile STATIC_PLUGIN=yes

  You can specify SASLDB=1 SASL_DB_PATH=c:\\\\sasl\\\\sasldb options
  to enable sasldb plugin with berkeley db.
  You need also DB_LIBPATH, DB_INCLUDE, and DB_LIB options.
  The plugin will be also statically linked
  with STATIC_PLUGIN=yes option.

********************************************************************************

Regards,

Takashi HOSHINO <hoshino at labs.cybozu.co.jp>
Cybozu Labs, Inc.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 3-deleting-build-warnings.patch
Url: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/attachments/20091209/09ba2f35/attachment-0003.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 1-static-plugin-autotools.patch
Url: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/attachments/20091209/09ba2f35/attachment-0004.ksh 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 2-static-plugin-nmake.patch
Url: http://lists.andrew.cmu.edu/pipermail/cyrus-sasl/attachments/20091209/09ba2f35/attachment-0005.ksh 


More information about the Cyrus-sasl mailing list