summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in20
1 files changed, 17 insertions, 3 deletions
diff --git a/configure.in b/configure.in
index fbce603..2abbf10 100644
--- a/configure.in
+++ b/configure.in
@@ -51,14 +51,29 @@ AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
+# 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"
+ echo "enabling debug compile mode"
+fi
+
+# TODO: Make SMB support an option
+# TODO: Make LDAP support an option
+
# Check for libraries
AC_CHECK_LIB([pthread], [pthread_create], ,
[ echo "ERROR: Pthread libraries required."; exit 1] )
-# Check for libraries
AC_CHECK_LIB([crypt], [crypt], ,
[ echo "ERROR: Crypt library required."; exit 1] )
-
+
+AC_CHECK_LIB([ldap], [ldap_init], ,
+ [ echo "ERROR: Open LDAP 2.x library required."; exit 1] )
+
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([unistd.h stdio.h stddef.h fcntl.h stdlib.h assert.h errno.h stdarg.h err.h string.h], ,
@@ -73,7 +88,6 @@ AC_CHECK_DECL(PTHREAD_MUTEX_ERRORCHECK_NP, [AC_DEFINE(HAVE_ERR_MUTEX, 1, "Error
[echo "ERROR: Missing error checking mutex functionality in pthread.h"],
[ #include <pthread.h> ])], [ #include <pthread.h> ])
-
# Required Functions
AC_CHECK_FUNCS([memset strerror malloc realloc getopt strchr tolower], ,
[echo "ERROR: Required function missing"; exit 1])