summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2009-07-28 23:01:09 +0000
committerStef Walter <stef@memberwebs.com>2009-07-28 23:01:09 +0000
commitb6afde4dc66db780c4bc832d8c66bf2c2df0c823 (patch)
tree03b4aff0100188f4fbdb19aedbdaebb19daf5dec /configure.in
parent08c805c462323f2124ebd69dde557cb0a4064dc4 (diff)
Add skeleton
git-svn-id: http://internal-svn-server/svn/network/slapi-suffix@1506 96c7dce7-e4ff-0310-afa0-05b99c2e9643
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in103
1 files changed, 103 insertions, 0 deletions
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..3d5c644
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,103 @@
+dnl
+dnl Copyright (c) 2009, Stef Walter
+dnl All rights reserved.
+dnl
+dnl Redistribution and use in source and binary forms, with or without
+dnl modification, are permitted provided that the following conditions
+dnl are met:
+dnl
+dnl * Redistributions of source code must retain the above
+dnl copyright notice, this list of conditions and the
+dnl following disclaimer.
+dnl * Redistributions in binary form must reproduce the
+dnl above copyright notice, this list of conditions and
+dnl the following disclaimer in the documentation and/or
+dnl other materials provided with the distribution.
+dnl * The names of contributors to this software may not be
+dnl used to endorse or promote products derived from this
+dnl software without specific prior written permission.
+dnl
+dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+dnl "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+dnl LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+dnl FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+dnl COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+dnl INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+dnl BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+dnl OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+dnl AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+dnl OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+dnl THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+dnl DAMAGE.
+dnl
+dnl
+dnl CONTRIBUTORS
+dnl Stef Walter <stef@memberwebs.com>
+dnl
+
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(slapi-suffix, 0.1, stef@memberwebs.com)
+AM_INIT_AUTOMAKE(slapi-suffix, 0.2)
+
+LDFLAGS="$LDFLAGS -L/usr/local/lib"
+CFLAGS="$CFLAGS -I/usr/local/include"
+
+AC_CONFIG_SRCDIR([plugin/plugin.c])
+AM_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_PROG_INSTALL
+AC_PROG_LN_S
+
+# Note: We can't really check for libslapi as it's a library internal
+# to slapd and won't compile into any other executable directly.
+#
+# AC_CHECK_LIB(slapi, slapi_pblock_set, ,
+# [echo "ERROR: Must have SLAPI libraries installed."; exit 1])
+
+# Checks for header files.
+AC_FUNC_ALLOCA
+AC_HEADER_STDC
+AC_CHECK_HEADERS([ldap.h], ,
+ [echo "ERROR: Required LDAP header missing"; exit 1])
+
+AC_CHECK_HEADERS([slapi-plugin.h], ,
+ [echo "Missing SLAPI plugin headers, using our own."])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+
+# Required Functions
+AC_CHECK_FUNCS([vsnprintf], ,
+ [echo "ERROR: Required function missing"; exit 1])
+
+# 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 -D_DEBUG=1 -Wall -Werror"
+ echo "enabling debug compile mode"
+fi
+
+# Log to syslog
+AC_ARG_WITH(syslog,
+ AC_HELP_STRING([--without-syslog],
+ [Don't log to syslog in addition to slapd logs]))
+
+if test "$with_syslog" != "no"; then
+ AC_DEFINE_UNQUOTED(WITH_SYSLOG, 1, [With syslog logging])
+fi
+
+AC_CONFIG_FILES([
+ Makefile
+ doc/Makefile
+ plugin/Makefile
+ tests/Makefile
+ tools/Makefile
+ ])
+AC_OUTPUT
+