dnl AC_MSG_RESULT([OpenLDAP --with-$1 $ol_with_$1])
# end --with-$1
])dnl
-dnl
-dnl ====================================================================
-dnl
-AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
-[changequote(<<, >>)dnl
-dnl The name to #define.
-define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
-dnl The cache variable name.
-define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
-changequote([, ])dnl
-AC_MSG_CHECKING(size of $1)
-AC_CACHE_VAL(AC_CV_NAME,
-[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
-#include <stdlib.h>
-#include <sys/types.h>
-$2
-]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])],[AC_CV_NAME=$ac_size],[])
- if test x$AC_CV_NAME != x ; then break; fi
-done
-])
-if test x$AC_CV_NAME = x ; then
- AC_MSG_ERROR([cannot determine a size for $1])
-fi
-AC_MSG_RESULT($AC_CV_NAME)
-AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
-undefine([AC_TYPE_NAME])dnl
-undefine([AC_CV_NAME])dnl
-])
-dnl ====================================================================
-dnl check if hard links are supported.
-dnl
-AC_DEFUN([OL_PROG_LN_H], [# test for ln hardlink support
-AC_MSG_CHECKING(whether ln works)
-AC_CACHE_VAL(ol_cv_prog_LN_H,
-[rm -f conftest.src conftest.dst
-echo "conftest" > conftest.src
-if ln conftest.src conftest.dst 2>/dev/null
-then
- ol_cv_prog_LN_H="ln"
-else
- ol_cv_prog_LN_H="cp"
-fi
-rm -f conftest.src conftest.dst
-])dnl
-LN_H="$ol_cv_prog_LN_H"
-if test "$ol_cv_prog_LN_H" = "ln"; then
- AC_MSG_RESULT(yes)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST(LN_H)dnl
-])dnl
-dnl
dnl ====================================================================
dnl Check for dependency generation flag
AC_DEFUN([OL_MKDEPEND], [# test for make depend flag
])
dnl
dnl ====================================================================
-dnl Check if struct passwd has pw_gecos
-AC_DEFUN([OL_STRUCT_PASSWD_PW_GECOS], [# test for pw_gecos in struct passwd
-AC_CACHE_CHECK([struct passwd for pw_gecos],ol_cv_struct_passwd_pw_gecos,[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pwd.h>]], [[
- struct passwd pwd;
- pwd.pw_gecos = pwd.pw_name;
-]])],[ol_cv_struct_passwd_pw_gecos=yes],[ol_cv_struct_passwd_pw_gecos=no])])
-if test $ol_cv_struct_passwd_pw_gecos = yes ; then
- AC_DEFINE(HAVE_PW_GECOS,1, [define if struct passwd has pw_gecos])
-fi
-])
-dnl
-dnl --------------------------------------------------------------------
-dnl Check if struct passwd has pw_passwd
-AC_DEFUN([OL_STRUCT_PASSWD_PW_PASSWD], [# test for pw_passwd in struct passwd
-AC_CACHE_CHECK([struct passwd for pw_passwd],ol_cv_struct_passwd_pw_passwd,[
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <pwd.h>]], [[
- struct passwd pwd;
- pwd.pw_passwd = pwd.pw_name;
-]])],[ol_cv_struct_passwd_pw_passwd=yes],[ol_cv_struct_passwd_pw_passwd=no])])
-if test $ol_cv_struct_passwd_pw_passwd = yes ; then
- AC_DEFINE(HAVE_PW_PASSWD,1, [define if struct passwd has pw_passwd])
-fi
-])
-dnl
-dnl ====================================================================
dnl DNS resolver macros
AC_DEFUN([OL_RESOLVER_TRY],
[if test $ol_cv_lib_resolver = no ; then
]])
AC_DEFUN([OL_PTHREAD_TEST_PROGRAM],
-[OL_PTHREAD_TEST_INCLUDES
+AC_LANG_SOURCE([OL_PTHREAD_TEST_INCLUDES
int main(argc, argv)
int argc;
{
OL_PTHREAD_TEST_FUNCTION
}
-])
+]))
dnl --------------------------------------------------------------------
AC_DEFUN([OL_PTHREAD_TRY], [# Pthread try link: $1 ($2)
if test "$ol_link_threads" = no ; then
AC_RUN_IFELSE([OL_PTHREAD_TEST_PROGRAM],
[$2=yes],
[$2=no],
- [AC_TRY_LINK(OL_PTHREAD_TEST_INCLUDES,OL_PTHREAD_TEST_FUNCTION,
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM(OL_PTHREAD_TEST_INCLUDES,
+ OL_PTHREAD_TEST_FUNCTION)],
[$2=yes], [$2=no])])
# restore the LIBS
])dnl
dnl
dnl ====================================================================
-dnl Define sig_atomic_t if not defined in signal.h
-AC_DEFUN([OL_TYPE_SIG_ATOMIC_T],
- [AC_CACHE_CHECK(for sig_atomic_t, ol_cv_type_sig_atomic_t,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]], [[sig_atomic_t atomic;]])],[ol_cv_type_sig_atomic_t=yes],[ol_cv_type_sig_atomic_t=no])])
- if test $ol_cv_type_sig_atomic_t = no; then
- AC_DEFINE(sig_atomic_t,int,
- [define to atomic type if sig_atomic_t is not available])
- fi
- ])dnl
-dnl
-dnl ====================================================================
-dnl Define socklen_t if not defined in sys/types.h or sys/socket.h
-AC_DEFUN([OL_TYPE_SOCKLEN_T],
- [AC_CACHE_CHECK(for socklen_t, ol_cv_type_socklen_t,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-]], [[socklen_t len;]])],[ol_cv_type_socklen_t=yes],[ol_cv_type_socklen_t=no])])
- if test $ol_cv_type_socklen_t = no; then
- AC_DEFINE(socklen_t, int,
- [define to int if socklen_t is not available])
- fi
- ])dnl
-dnl
-dnl ====================================================================
dnl Define inet_aton is available
AC_DEFUN([OL_FUNC_INET_ATON],
[AC_CACHE_CHECK([for inet_aton()], ol_cv_func_inet_aton,
], [ol_cv_sasl_compat=yes], [ol_cv_sasl_compat=no])])
])
dnl ====================================================================
-dnl check for msg_accrights in msghdr
-AC_DEFUN([OL_MSGHDR_MSG_ACCRIGHTS],
- [AC_CACHE_CHECK(for msg_accrights in msghdr, ol_cv_msghdr_msg_accrights,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[struct msghdr m; m.msg_accrightslen=0]])],[ol_cv_msghdr_msg_accrights=yes],[ol_cv_msghdr_msg_accrights=no])
- ])
- if test $ol_cv_msghdr_msg_accrights = "yes" ; then
- AC_DEFINE(HAVE_MSGHDR_MSG_ACCRIGHTS,1,
- [define if struct msghdr has msg_accrights])
- fi
-])dnl
-dnl ====================================================================
-dnl check for cmsghdr
-AC_DEFUN([OL_MSGHDR_MSG_CONTROL],
- [AC_CACHE_CHECK(for msg_control in msghdr, ol_cv_msghdr_msg_control,
- [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/socket.h>]], [[struct msghdr m; m.msg_control=(struct cmsghdr *)0]])],[ol_cv_msghdr_msg_control=yes],[ol_cv_msghdr_msg_control=no])
- ])
- if test $ol_cv_msghdr_msg_control = "yes" ; then
- AC_DEFINE(HAVE_MSGHDR_MSG_CONTROL,1,
- [define if struct msghdr has msg_control])
- fi
-])dnl
+dnl check for SSL compatibility
AC_DEFUN([OL_SSL_COMPAT],
[AC_CACHE_CHECK([OpenSSL library version (CRL checking capability)], [ol_cv_ssl_crl_compat],[
AC_EGREP_CPP(__ssl_compat,[