summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorStef Walter <stef@thewalter.net>2008-06-02 20:21:37 +0000
committerStef Walter <stef@thewalter.net>2008-06-02 20:21:37 +0000
commit3c75705512cafe50a9bd166e90b699e768f93160 (patch)
treec60b0fec26233664314110d42f62519dddb08bc4 /configure.in
Initial import
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in53
1 files changed, 53 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..4301946
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,53 @@
+# Process this file with autoconf to produce a configure script.
+AC_INIT(cyrus-distributed-sasl-plugin, 0.1, stef@memberwebs.com)
+AM_INIT_AUTOMAKE(cyrus-distributed-sasl-plugin, 0.1)
+
+AC_CONFIG_SRCDIR([plugin/delegateldap.c])
+AM_CONFIG_HEADER([config.h])
+
+LDFLAGS="$LDFLAGS -L/usr/local/lib"
+CFLAGS="$CFLAGS -I/usr/local/include"
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_INSTALL
+AC_PROG_LIBTOOL
+
+# Debug mode
+AC_ARG_ENABLE(debug,
+ AC_HELP_STRING([--enable-debug],
+ [Compile binaries in debug mode]))
+
+if test "$enable_debug" = "yes"; then
+ CFLAGS="$CFLAGS -g -O0 -Wall"
+ AC_DEFINE_UNQUOTED(_DEBUG, 1, [In debug mode])
+ echo "enabling debug compile mode"
+fi
+
+# Checks for header files.
+AC_HEADER_STDC
+
+AC_CHECK_LIB(ldap, ldap_initialize, ,
+ [echo "Couldn't find the OpenLDAP library"; exit 1])
+AC_CHECK_LIB(lber, ber_bvfree, ,
+ [echo "Couldn't find the OpenLDAP ber library"; exit 1])
+
+AC_CHECK_LIB(sasl2, sasl_server_init, ,
+ [echo "Couldn't find the Cyrus SASL 2 library"; exit 1])
+AC_CHECK_HEADERS([sasl/sasl.h sasl/saslplug.h], ,
+ [echo "Couldn't find Cyrus SASL headers"; exit 1],
+ [#include <sasl/sasl.h>])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_TYPE_SIZE_T
+
+# Checks for library functions.
+AC_FUNC_MALLOC
+AC_FUNC_MEMCMP
+
+AC_CONFIG_FILES([
+ Makefile
+ plugin/Makefile])
+AC_OUTPUT
+