dnl AC_MSG_RESULT([OpenLDAP --with-$1 $ol_with_$1])
# end --with-$1
])dnl
-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
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])
- ])
+ [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])
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])
- ])
+ [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
-
echo "$as_me:$LINENO: checking for socklen_t" >&5
echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
if test "${ol_cv_type_socklen_t+set}" = set; then
fi
-echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
-echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
-if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
+echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
+if test "${ol_cv_type_sig_atomic_t+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <signal.h>
int
main ()
{
-static struct stat ac_aggr;
-if (ac_aggr.st_blksize)
-return 0;
+sig_atomic_t atomic;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_blksize=yes
+ ol_cv_type_sig_atomic_t=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-cat >conftest.$ac_ext <<_ACEOF
+ol_cv_type_sig_atomic_t=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ol_cv_type_sig_atomic_t" >&5
+echo "${ECHO_T}$ol_cv_type_sig_atomic_t" >&6
+ if test $ol_cv_type_sig_atomic_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define sig_atomic_t int
+_ACEOF
+
+ fi
+
+
+echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
+if test "${ac_cv_header_time+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
int
main ()
{
-static struct stat ac_aggr;
-if (sizeof ac_aggr.st_blksize)
+if ((struct tm *) 0)
return 0;
;
return 0;
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_member_struct_stat_st_blksize=yes
+ ac_cv_header_time=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_member_struct_stat_st_blksize=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_header_time=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
-echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
-if test $ac_cv_member_struct_stat_st_blksize = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+echo "${ECHO_T}$ac_cv_header_time" >&6
+if test $ac_cv_header_time = yes; then
-cat >>confdefs.h <<_ACEOF
-#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
_ACEOF
-
fi
-echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
-echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
-if test "${ac_cv_header_time+set}" = set; then
+echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
+if test "${ac_cv_struct_tm+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <sys/types.h>
-#include <sys/time.h>
#include <time.h>
int
main ()
{
-if ((struct tm *) 0)
-return 0;
+struct tm *tp; tp->tm_sec;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_header_time=yes
+ ac_cv_struct_tm=time.h
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_header_time=no
+ac_cv_struct_tm=sys/time.h
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
-echo "${ECHO_T}$ac_cv_header_time" >&6
-if test $ac_cv_header_time = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+echo "${ECHO_T}$ac_cv_struct_tm" >&6
+if test $ac_cv_struct_tm = sys/time.h; then
cat >>confdefs.h <<\_ACEOF
-#define TIME_WITH_SYS_TIME 1
+#define TM_IN_SYS_TIME 1
_ACEOF
fi
-echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
-echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
-if test "${ac_cv_struct_tm+set}" = set; then
+echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
+echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
+if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
-#include <time.h>
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blksize)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_stat_st_blksize=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
int
main ()
{
-struct tm *tp; tp->tm_sec;
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blksize)
+return 0;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_struct_tm=time.h
+ ac_cv_member_struct_stat_st_blksize=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ac_cv_struct_tm=sys/time.h
+ac_cv_member_struct_stat_st_blksize=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
-echo "${ECHO_T}$ac_cv_struct_tm" >&6
-if test $ac_cv_struct_tm = sys/time.h; then
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
+echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
+if test $ac_cv_member_struct_stat_st_blksize = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define TM_IN_SYS_TIME 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
_ACEOF
+
fi
-echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
-echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6
-if test "${ol_cv_type_sig_atomic_t+set}" = set; then
+echo "$as_me:$LINENO: checking for struct passwd.pw_gecos" >&5
+echo $ECHO_N "checking for struct passwd.pw_gecos... $ECHO_C" >&6
+if test "${ac_cv_member_struct_passwd_pw_gecos+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <signal.h>
+$ac_includes_default
int
main ()
{
-sig_atomic_t atomic;
+static struct passwd ac_aggr;
+if (ac_aggr.pw_gecos)
+return 0;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ol_cv_type_sig_atomic_t=yes
+ ac_cv_member_struct_passwd_pw_gecos=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ol_cv_type_sig_atomic_t=no
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-echo "$as_me:$LINENO: result: $ol_cv_type_sig_atomic_t" >&5
-echo "${ECHO_T}$ol_cv_type_sig_atomic_t" >&6
- if test $ol_cv_type_sig_atomic_t = no; then
-
-cat >>confdefs.h <<\_ACEOF
-#define sig_atomic_t int
-_ACEOF
-
- fi
-
-
-
-# test for pw_gecos in struct passwd
-echo "$as_me:$LINENO: checking struct passwd for pw_gecos" >&5
-echo $ECHO_N "checking struct passwd for pw_gecos... $ECHO_C" >&6
-if test "${ol_cv_struct_passwd_pw_gecos+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-
- cat >conftest.$ac_ext <<_ACEOF
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <pwd.h>
+$ac_includes_default
int
main ()
{
-
- struct passwd pwd;
- pwd.pw_gecos = pwd.pw_name;
-
+static struct passwd ac_aggr;
+if (sizeof ac_aggr.pw_gecos)
+return 0;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ol_cv_struct_passwd_pw_gecos=yes
+ ac_cv_member_struct_passwd_pw_gecos=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ol_cv_struct_passwd_pw_gecos=no
+ac_cv_member_struct_passwd_pw_gecos=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ol_cv_struct_passwd_pw_gecos" >&5
-echo "${ECHO_T}$ol_cv_struct_passwd_pw_gecos" >&6
-if test $ol_cv_struct_passwd_pw_gecos = yes ; then
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_gecos" >&5
+echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_gecos" >&6
+if test $ac_cv_member_struct_passwd_pw_gecos = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PW_GECOS 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_GECOS 1
_ACEOF
+
fi
-# test for pw_passwd in struct passwd
-echo "$as_me:$LINENO: checking struct passwd for pw_passwd" >&5
-echo $ECHO_N "checking struct passwd for pw_passwd... $ECHO_C" >&6
-if test "${ol_cv_struct_passwd_pw_passwd+set}" = set; then
+echo "$as_me:$LINENO: checking for struct passwd.pw_passwd" >&5
+echo $ECHO_N "checking for struct passwd.pw_passwd... $ECHO_C" >&6
+if test "${ac_cv_member_struct_passwd_pw_passwd+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <pwd.h>
+$ac_includes_default
int
main ()
{
+static struct passwd ac_aggr;
+if (ac_aggr.pw_passwd)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_member_struct_passwd_pw_passwd=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
- struct passwd pwd;
- pwd.pw_passwd = pwd.pw_name;
-
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static struct passwd ac_aggr;
+if (sizeof ac_aggr.pw_passwd)
+return 0;
;
return 0;
}
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ol_cv_struct_passwd_pw_passwd=yes
+ ac_cv_member_struct_passwd_pw_passwd=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-ol_cv_struct_passwd_pw_passwd=no
+ac_cv_member_struct_passwd_pw_passwd=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-echo "$as_me:$LINENO: result: $ol_cv_struct_passwd_pw_passwd" >&5
-echo "${ECHO_T}$ol_cv_struct_passwd_pw_passwd" >&6
-if test $ol_cv_struct_passwd_pw_passwd = yes ; then
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_passwd_pw_passwd" >&5
+echo "${ECHO_T}$ac_cv_member_struct_passwd_pw_passwd" >&6
+if test $ac_cv_member_struct_passwd_pw_passwd = yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_PW_PASSWD 1
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_PASSWD_PW_PASSWD 1
_ACEOF
+
fi
ol_cv_msghdr_msg_accrights=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
fi
echo "$as_me:$LINENO: result: $ol_cv_msghdr_msg_accrights" >&5
echo "${ECHO_T}$ol_cv_msghdr_msg_accrights" >&6
ol_cv_msghdr_msg_control=no
fi
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
fi
echo "$as_me:$LINENO: result: $ol_cv_msghdr_msg_control" >&5
echo "${ECHO_T}$ol_cv_msghdr_msg_control" >&6