summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2014-12-15 02:59:28 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2014-12-15 02:59:28 -0500
commit6178fa92ba550d57e3f459178bbd7dd6c027c1f9 (patch)
treebc7c09d7040c51389ff204dc5c05d897fb43d050
parent7cf822201abf30c1603334e0b7e664050e2e38a2 (diff)
update configure
-rw-r--r--configure.ac71
-rw-r--r--nslcd/Makefile.am2
-rw-r--r--nslcd/common.h5
3 files changed, 50 insertions, 28 deletions
diff --git a/configure.ac b/configure.ac
index d423cec..f25c6f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -155,38 +155,62 @@ then
fi
# check the name of the configuration file
-AC_ARG_WITH(ldap-conf-file,
- AS_HELP_STRING([--with-ldap-conf-file=PATH],
+AC_ARG_WITH(nslcd-conf-file,
+ AS_HELP_STRING([--with-nslcd-conf-file=PATH],
[path to nslcd configuration file @<:@/etc/nslcd.conf@:>@]),
- [ NSLCD_CONF_PATH="$with_ldap_conf_file" ],
+ [ NSLCD_CONF_PATH="$with_nslcd_conf_file" ],
[ NSLCD_CONF_PATH="/etc/nslcd.conf" ])
AC_DEFINE_UNQUOTED(NSLCD_CONF_PATH, "$NSLCD_CONF_PATH", [Path to nslcd configuration file.])
AC_SUBST(NSLCD_CONF_PATH)
# the SONAME to use for the NSS module
-AC_MSG_CHECKING([name of NSS module])
-AC_ARG_WITH(nss-ldap-soname,
- AS_HELP_STRING([--with-nss-ldap-soname=SONAME],
- [name of NSS module @<:@auto@:>@]),
- [ NSS_LDAP_SONAME="$with_nss_ldap_soname" ],
- [ NSS_LDAP_SONAME="auto" ])
-if test "x$NSS_LDAP_SONAME" = "xauto"
+AC_MSG_CHECKING([soname of NSS module])
+AC_ARG_WITH(nss-module-soname,
+ AS_HELP_STRING([--with-nss-module-soname=SONAME],
+ [soname of NSS module @<:@auto@:>@]),
+ [ NSS_MODULE_SONAME="$with_nss_module_soname" ],
+ [ NSS_MODULE_SONAME="auto" ])
+if test "x$NSS_MODULE_SONAME" = "xauto"
then
case "$target_os" in
- solaris*) NSS_LDAP_SONAME="nss_ldap.so.1" ;;
- freebsd*|dragonfly*) NSS_LDAP_SONAME="nss_ldap.so.1" ;;
- *) NSS_LDAP_SONAME="libnss_ldap.so.2" ;;
+ solaris*) NSS_MODULE_SONAME="nss_ldap.so.1" ;;
+ freebsd*|dragonfly*) NSS_MODLULE_SONAME="nss_ldap.so.1" ;;
+ *) NSS_MODULE_SONAME="libnss_ldap.so.2" ;;
esac
fi
-AC_MSG_RESULT($NSS_LDAP_SONAME)
-AC_DEFINE_UNQUOTED(NSS_LDAP_SONAME, "$NSS_LDAP_SONAME", [The SONAME of the NSS library module.])
-AC_SUBST(NSS_LDAP_SONAME)
+AC_MSG_RESULT($NSS_MODULE_SONAME)
+AC_DEFINE_UNQUOTED(NSS_MODULE_SONAME, "$NSS_MODULE_SONAME", [The SONAME of the NSS library module.])
+AC_SUBST(NSS_MODULE_SONAME)
-# check which modules should be build
-AC_ARG_WITH(nss-maps,
- AS_HELP_STRING([--with-nss-maps=MAP LIST],
- [comma separated list of NSS maps to build @<:@all@:>@]),,
- [ with_nss_maps="all" ])
+AC_MSG_CHECKING([name of NSS module])
+AC_ARG_WITH(nss-module-name,
+ AS_HELP_STRING([--with-nss-module-name=NAME],
+ [name of NSS module @<:@ldap@:>@]),
+ [ NSS_MODULE_NAME="$with_nss_module_name" ],
+ [ NSS_MODULE_NAME="ldap" ])
+AC_MSG_RESULT($NSS_MODULE_NAME)
+AC_DEFINE_UNQUOTED(NSS_MODULE_NAME, "$NSS_MODULE_NAME", [The NAME of the NSS library module.])
+AC_SUBST(NSS_MODULE_NAME)
+
+AC_MSG_CHECKING([symbol name of the NSS module version])
+AC_ARG_WITH(nss-module-sym-version,
+ AS_HELP_STRING([--with-nss-module-sym-version=SYM],
+ [symbol name of the NSS module version @<:@_nss_ldap_version@:>@]),
+ [ NSS_MODULE_SYM_VERSION="$with_nss_module_sym_version" ],
+ [ NSS_MODULE_SYM_VERSION="_nss_ldap_version" ])
+AC_MSG_RESULT($NSS_MODULE_SYM_VERSION)
+AC_DEFINE_UNQUOTED(NSS_MODULE_SYM_VERSION, "$NSS_MODULE_SYM_VERSION", [The symbol name of the NSS library module version.])
+AC_SUBST(NSS_MODULE_SYM_VERSION)
+
+AC_MSG_CHECKING([symbol name of the NSS module enable flag])
+AC_ARG_WITH(nss-module-sym-enablelookups,
+ AS_HELP_STRING([--with-nss-module-sym-enablelookups=SYM],
+ [symbol name of the NSS module enable flag @<:@_nss_ldap_version@:>@]),
+ [ NSS_MODULE_SYM_ENABLELOOKUPS="$with_nss_module_sym_enablelookups" ],
+ [ NSS_MODULE_SYM_ENABLELOOKUPS="_nss_ldap_enablelookups" ])
+AC_MSG_RESULT($NSS_MODULE_SYM_ENABLELOOKUPS)
+AC_DEFINE_UNQUOTED(NSS_MODULE_SYM_ENABLELOOKUPS, "$NSS_MODULE_SYM_ENABLELOOKUPS", [The symbol name of the NSS library module enable flag.])
+AC_SUBST(NSS_MODULE_SYM_ENABLELOOKUPS)
# checks for availability of header files
AC_CHECK_HEADERS([ctype.h strings.h pthread.h pthread_np.h fcntl.h limits.h])
@@ -287,10 +311,13 @@ then
AC_SEARCH_LIBS(gethostbyname, nsl socket)
AC_SEARCH_LIBS(hstrerror, resolv)
AC_SEARCH_LIBS(dlopen, dl)
+ AC_SEARCH_LIBS(yaml_parser_initialize, yaml)
+ AC_SEARCH_LIBS(crypt_r, crypt)
- # check fo availability of sytemd socket activation
+ # check for availability of sytemd socket activation
AC_SEARCH_LIBS(sd_listen_fds, systemd)
+
# check for availability of functions
AC_CHECK_FUNCS(initgroups setgroups execvp execvpe)
AC_CHECK_FUNCS(getpeereid)
diff --git a/nslcd/Makefile.am b/nslcd/Makefile.am
index acc7250..cda2716 100644
--- a/nslcd/Makefile.am
+++ b/nslcd/Makefile.am
@@ -37,7 +37,7 @@ nslcd_SOURCES = nslcd.c ../nslcd.h ../common/nslcd-prot.h \
nslcd_LDADD = ../common/libtio.a ../common/libdict.a \
../common/libexpr.a ../common/libinotify_helpers.a \
../compat/libcompat.a \
- -lcrypt -lyaml @nslcd_LIBS@ @PTHREAD_LIBS@
+ @nslcd_LIBS@ @PTHREAD_LIBS@
$(patsubst %.c,%.o,$(shell grep -lF common.h *.c)): dispatch.h
diff --git a/nslcd/common.h b/nslcd/common.h
index 558b978..ac84734 100644
--- a/nslcd/common.h
+++ b/nslcd/common.h
@@ -39,11 +39,6 @@
#include "cfg.h"
#include "hackers.h"
-#define NSS_MODULE_SONAME NSS_LDAP_SONAME
-#define NSS_MODULE_NAME "ldap"
-#define NSS_MODULE_SYM_VERSION "_nss_ldap_version"
-#define NSS_MODULE_SYM_ENABLELOOKUPS "_nss_ldap_enablelookups"
-
/* macros for basic read and write operations, the following
ERROR_OUT* marcos define the action taken on errors
the stream is not closed because the caller closes the