aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2014-08-24 17:34:16 +0300
committerSergey Poznyakoff <gray@gnu.org>2014-08-24 17:34:16 +0300
commit124b8aa2497703558fcebe5b10b675e1d426759d (patch)
treeda644de0ac17c7e53e7df5e666765606f7a4026d /configure.ac
parent1cb788cfec3dca18a2a06f30fb1e38826a51e89d (diff)
downloadsmap-124b8aa2497703558fcebe5b10b675e1d426759d.tar.gz
smap-124b8aa2497703558fcebe5b10b675e1d426759d.tar.bz2
New module: ldap
* configure.ac: Detect LDAP. New option --with-ldap * include/smap/parseopt.h (smap_option)<func>: Change signature. (SMAP_DELIM_EQ,SMAP_DELIM_WS,SMAP_DELIM_MASK) (SMAP_PARSE_SUCCESS,SMAP_PARSE_NOENT) (SMAP_PARSE_INVAL): New defines. (smap_parseline): New proto. * include/smap/wordsplit.h (wordsplit)<ws_getvar>: Remove const from the return value: the function should allocate memory. (wordsplit_varnames): New proto. * lib/wordsplit.c (ISVARBEG,ISVARCHR): New macros. (wordsplit_varnames): New function (expvar): ws_getvar allocates memory. * lib/parseopt.c (find_opt): Take flags as additional argument. Support case-insensitive comparison and whitespace delimiters. (smap_parseline): New function. (smap_parseopt): Rewrite using smap_parseline. * modules/Makefile.am: Add ldap module. * modules/ldap/Makefile.am: New file. * modules/ldap/ldap.c: New file. * modules/mysql/Makefile.am: Minor change. * modules/mysql/mysql.c: Minor change. * src/srvman.c (smap_server_new): Save url.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index aca7ee6..66c9a92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,6 +159,24 @@ if test $status_postgres != no; then
fi
AM_CONDITIONAL([POSTGRES_COND],[test $status_postgres = yes])
+# LDAP
+AC_ARG_WITH([ldap],
+ AC_HELP_STRING([--with-ldap],
+ [build LDAP module]),
+ [status_ldap=${withval}],
+ [status_ldap=maybe])
+
+if test $status_ldap != no; then
+ AC_CHECK_LIB(ldap, ldap_bind,
+ [status_ldap=yes],
+ [if test $status_ldap = yes; then
+ AC_MSG_ERROR([the required library libldap is not found])
+ else
+ status_ldap=no
+ fi])
+fi
+AM_CONDITIONAL([LDAP_COND],[test $status_postgres = yes])
+
# Readline
AC_ARG_WITH([readline],
AC_HELP_STRING([--with-readline],
@@ -215,6 +233,7 @@ Mailutils ................................ $status_mailutils
Guile .................................... $status_guile
MySQL .................................... $status_mysql
Postgres ................................. $status_postgres
+LDAP ..................................... $status_ldap
Readline ................................. $status_readline
*******************************************************************
@@ -229,6 +248,7 @@ fi
status_guile=$status_guile
status_mysql=$status_mysql
status_postgres=$status_postgres
+status_ldap=$status_ldap
status_readline=$status_readline
])
@@ -245,5 +265,6 @@ AC_CONFIG_FILES([Makefile
modules/guile/Makefile
modules/mysql/Makefile
modules/postgres/Makefile
+ modules/ldap/Makefile
doc/Makefile])
AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.