dnl $OpenLDAP$
dnl
-dnl Copyright 1998-2001 The OpenLDAP Foundation. All Rights Reserved.
+dnl Copyright 1998-2002 The OpenLDAP Foundation. All Rights Reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
dnl modification, are permitted only as authorized by the OpenLDAP
# $]OpenLDAP[$
# from] translit([$OpenLDAP$], $")] [
-# Copyright 1998-2001 The OpenLDAP Foundation. All Rights Reserved.
+# Copyright 1998-2002 The OpenLDAP Foundation. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# http://www.OpenLDAP.org/license.html or in file LICENSE in the
# top-level directory of the distribution.
-echo "Copyright 1998-2001 The OpenLDAP Foundation, All Rights Reserved."
+echo "Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved."
echo "Restrictions apply, see COPYRIGHT and LICENSE files."
])dnl
dnl ----------------------------------------------------------------
if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
if test $ol_with_kerberos = no ; then
AC_MSG_ERROR([options require --with-kerberos])
- elif $ol_with_kerberos = auto ; then
+ elif test $ol_with_kerberos = auto ; then
ol_with_kerberos=yes
fi
dnl (for now, let autoconf sort this out)
dnl CFLAGS=${CFLAGS-""}
+AC_CHECK_PROGS(AR,ar gar)
+
AC_LIBTOOL_WIN32_DLL
AC_LIBTOOL_DLOPEN
AC_PROG_LIBTOOL
dnl ----------------------------------------------------------------
dnl PF_INET6 support requires getaddrinfo and INET6_ADDRSTRLEN
dnl PF_LOCAL may use getaddrinfo in available
-AC_CHECK_FUNCS( getaddrinfo inet_ntop )
+AC_CHECK_FUNCS( getaddrinfo gai_strerror inet_ntop )
ol_link_ipv6=no
if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
if test $ol_enable_ipv6 = yes ; then
AC_MSG_ERROR([IPv6 support requires getaddrinfo() and inet_ntop()])
fi
-else
- AC_CHECK_FUNCS( gai_strerror )
-
+elif test $ol_enable_ipv6 != no ; then
AC_CACHE_CHECK([INET6_ADDRSTRLEN],[ol_cv_inet6_addrstrlen],[
AC_EGREP_CPP(__has_inet6_addrstrlen__,[
# include <netinet/in.h>
-o $ol_with_threads = mach ; then
dnl check for Mach CThreads
- AC_CHECK_HEADERS(mach/cthreads.h)
+ AC_CHECK_HEADERS(mach/cthreads.h cthreads.h)
if test $ac_cv_header_mach_cthreads_h = yes ; then
ol_with_threads=found
- dnl check for cthread support in current $LIBS
+ dnl check for cthreads support in current $LIBS
AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
if test $ol_link_threads = no ; then
if test $ol_cv_cthread_all_load = yes ; then
LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
ol_link_threads=mach
+ ol_with_threads=found
fi
fi
- if test $ol_link_threads != no ; then
- : check for cthread specific functionality here
- AC_DEFINE(HAVE_MACH_CTHREADS,1,
- [define if you have Mach Cthreads])
+ elif test $ac_cv_header_cthreads_h = yes ; then
+ dnl Hurd variant of Mach Cthreads
+ dnl uses <cthreads.h> and -lthreads
+
+ ol_with_threads=found
+
+ dnl save the flags
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lthreads"
+ AC_CHECK_FUNC(cthread_fork,[ol_link_threads=yes])
+ LIBS="$save_LIBS"
+
+ if test $ol_link_threads = yes ; then
+ LTHREAD_LIBS="-lthreads"
+ ol_link_threads=mach
+ ol_with_threads=found
else
AC_MSG_ERROR([could not link with Mach CThreads])
fi
- fi
- if test $ol_with_threads = mach ; then
+ elif test $ol_with_threads = mach ; then
AC_MSG_ERROR([could not locate Mach CThreads])
fi
+
+ if test $ol_link_threads = mach ; then
+ AC_DEFINE(HAVE_MACH_CTHREADS,1,
+ [define if you have Mach Cthreads])
+ elif test $ol_with_threads = found ; then
+ AC_MSG_ERROR([could not link with Mach CThreads])
+ fi
fi
if test $ol_with_threads = auto -o $ol_with_threads = yes \
AC_DEFINE(HAVE_GNU_PTH,1,[if you have GNU Pth])
LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
ol_link_threads=pth
+ ol_with_threads=found
if test $ol_with_yielding_select = auto ; then
ol_with_yielding_select=yes
if test $have_cyrus_sasl != no ; then
SASL_LIBS="-lsasl"
AC_DEFINE(HAVE_CYRUS_SASL,1,[define if you have Cyrus SASL])
+ OL_SASL_COMPAT
+ if test $ol_cv_sasl_compat = no ; then
+ ol_link_sasl=no
+ AC_MSG_ERROR([Cyrus SASL library located but incompatible])
+ fi
ol_link_sasl=yes
fi
fi
)
dnl We actually may need to replace more than this.
-AC_REPLACE_FUNCS(getopt tempnam)
+AC_REPLACE_FUNCS(getopt)
if test "$ac_cv_func_getopt" != yes; then
LIBSRCS="$LIBSRCS getopt.c"
fi
-if test "$ac_cv_func_tempnam" != yes; then
- LIBSRCS="$LIBSRCS tempnam.c"
-fi
-
dnl ----------------------------------------------------------------
# Check Configuration
OL_SYS_ERRLIST