Fixed CRYPT, MD5, and SHA1 support.

Added basic -lwrap detection.
This commit is contained in:
Kurt Zeilenga 1998-09-18 22:54:37 +00:00
parent 6a235aad57
commit 92a1440f2d
7 changed files with 271 additions and 163 deletions

View File

@ -72,9 +72,7 @@ AC_LIBS = @LDFLAGS@ @LIBS@
AC_CFLAGS = @CFLAGS@
AC_LDFLAGS =
LIBCRYPT = @LIBCRYPT@
LIBTERMCAP = @LIBTERMCAP@
LIBDB = @LIBDB@
# Our Defaults
CC = $(AC_CC)

372
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,7 @@ CF_ARG_OPTION(md5,[ --enable-md5 enable MD5 passwords (yes)],[
CF_ARG_OPTION(sha1,[ --enable-sha1 enable SHA1 passwords (yes)],[
SLAPD_SHA1=no],[SLAPD_SHA1=yes],yes)dnl
CF_ARG_OPTION(wrappers,[ --enable-wrappers enable tcp wrapper support (no)],[
SLAPD_TCP_WRAPPERS=yes],[LDAP_TCP_WRAPPERS=no],no)dnl
SLAPD_TCP_WRAPPERS=yes],[SLAPD_TCP_WRAPPERS=no],no)dnl
CF_ARG_OPTION(phonetic,[ --enable-phonetic enable phonetic/soundex (no)],[
SLAPD_PHONETIC=yes],[SLAPD_PHONETIC=no],no)dnl
CF_ARG_OPTION(rlookups,[ --enable-rlookups enable reverse lookups (yes)],[
@ -151,11 +151,22 @@ LDAPD_LIBS=
## slapd arguments
SLAPD_DEFS=
SLAPD_LIBS=
LUTIL_DEFS=
if test "$SLAPD_PHONETIC" = "yes" ; then
AC_DEFINE(SLAPD_PHONETIC,1)
SLAPD_DEFS="$SLAPD_DEFS -DSOUNDEX"
fi
if test "$SLAPD_MD5" = "yes" ; then
AC_DEFINE(SLAPD_MD5,1)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_MD5"
fi
if test "$SLAPD_SHA1" = "yes" ; then
AC_DEFINE(SLAPD_SHA1,1)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_SHA1"
fi
if test "$SLAPD_LDBM" = "yes" ; then
dnl AC_DEFINE(SLAPD_LDBM,1)
SLAPD_DEFS="$SLAPD_DEFS -DLDAP_LDBM"
@ -175,7 +186,8 @@ SLURPD_LIBS=
dnl End Args
dnl Checks for programs.
dnl ----------------------------------------------------------------
dnl Checks for programs
AC_PROG_CC
AC_PROG_GCC_TRADITIONAL
@ -189,6 +201,9 @@ AC_PATH_PROG(SENDMAIL, sendmail, /usr/lib/sendmail,
AC_PATH_PROG(EDITOR, vi, /usr/ucb/vi, $PATH:/usr/ucb)
AC_PATH_PROG(FINGER, finger, /usr/ucb/finger, $PATH:/usr/ucb)
dnl ----------------------------------------------------------------
dnl Checks for libraries
ldbm_use="none"
LDBM_DEFS=
LDBM_LIBS=
@ -275,18 +290,32 @@ dnl AC_DEFINE(LDBM_USE_NDBM,1)
fi
fi
if test "$SLAPD_TCP_WRAPPERS" = "yes" ; then
AC_CHECK_LIB(wrap, hosts_access, [LIBTCPD="-lwrap"
AC_DEFINE(HAVE_TCPD)
SLAPD_DEFS="$SLAPD_DEFS -DTCP_WRAPPERS"
])
fi
# ud needs termcap (should insert check here)
LIBTERMCAP="-ltermcap"
AC_SUBST(LIBTERMCAP)
# FreeBSD (and others) have crypt(3) in -lcrypt
LIBCRYPT=
AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT), [
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"
AC_DEFINE(HAVE_CRYPT)])
])
AC_SUBST(LIBCRYPT)
if test "$SLAPD_CRYPT" = "yes" ; then
AC_CHECK_FUNC(crypt, have_crypt=yes, [
AC_CHECK_LIB(crypt, crypt, [LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
have_crypt=yes], [have_crypt=no])])
if test $have_crypt = yes ; then
AC_DEFINE(SLAPD_CRYPT,1)
LUTIL_DEFS="$LUTIL_DEFS -DLDAP_CRYPT"
else
AC_MSG_WARN(could not find crypt, disabling crypt support)
fi
fi
dnl ----------------------------------------------------------------
dnl Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
@ -305,6 +334,7 @@ AC_CHECK_HEADERS( \
unistd.h \
)
dnl ----------------------------------------------------------------
dnl Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_GETGROUPS
AC_TYPE_MODE_T
@ -320,6 +350,7 @@ AC_STRUCT_TM
dnl AC_C_BIGENDIAN
AC_C_CONST
dnl ----------------------------------------------------------------
dnl Checks for library functions.
AC_FUNC_MEMCMP
AC_TYPE_SIGNAL
@ -345,6 +376,7 @@ AC_CHECK_FUNCS( \
AC_REPLACE_FUNCS(strdup)
dnl ----------------------------------------------------------------
# Check Configuration
CF_SYS_ERRLIST
@ -369,6 +401,8 @@ AC_SUBST(LDBM_DEFS)
AC_SUBST(LDBM_LIBS)
AC_SUBST(LTHREAD_DEFS)
AC_SUBST(LTHREAD_LIBS)
AC_SUBST(LUTIL_DEFS)
AC_SUBST(LUTIL_LIBS)
dnl AC_OUTPUT( \
dnl contrib/Makefile:build/top.mk:contrib/Makefile.in:build/dir.mk \

View File

@ -5,3 +5,5 @@
LIBRARY = liblutil.a
SRCS = base64.c md5.c sha1.c
OBJS = base64.o md5.o sha1.o
XDEFS = @LUTIL_DEFS@

View File

@ -26,9 +26,9 @@ all-local: FORCE
$(MAKE) $(MFLAGS) slapd
(cd tools; $(MAKE) $(MFLAGS) all)
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@
XLIBS = @SLAPD_LIBS@ libbackends.a \
-lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@
-lavl -llutil -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ @LUTIL_LIBS@
slapd: version.o
$(CC) $(LDFLGS) -o $@ $(OBJS) version.o $(LIBS)

View File

@ -11,7 +11,7 @@ BUILD_OPT = "--enable-ldbm"
BUILD_SRV = @SLAPD_LDBM@
XINCLUDEDIR = -I..
XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@
XDEFS = @LDBM_DEFS@ @LTHREAD_DEFS@ @LUTIL_DEFS@
PROGRAMS = libback-ldbm.a

View File

@ -33,7 +33,7 @@ OBJS2 = ../config.o ../ch_malloc.o ../backend.o ../charray.o \
all-local: build-edb2ldif build-chlog2replog $(PROGRAMS)
XDEFS = @SLAPD_DEFS@ @LDBM_DEFS@ @LTHREAD_DEFS@
XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@
XLIBS = @SLAPD_LIBS@ -lavl -lldbm @LDBM_LIBS@ -llthread @LTHREAD_LIBS@ -llutil @LUTIL_LIBS@
build-edb2ldif: FORCE
@if [ "$(HAVE_ISODE)" = "yes" ]; then \