;;
esac
-for ac_func in nice nlist
+for ac_func in mrand48 srand48 nice nlist
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
fi
done
-for ac_func in random srandom mrand48 srand48
+case "$ac_cv_func_mrand48" in
+ yes) ;;
+ *) for ac_func in random
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6211: checking for $ac_func" 1>&5
+echo "configure:6213: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6216 "configure"
+#line 6218 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
#define `echo "HAVE_$ac_func" | $ac_tr_cpp` 1
EOF
+else
+ LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
fi
done
+ ;;
+esac
case "$target" in
*-*-aix4*)
# Just a stub in AIX 4. Idiots.
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6276: checking for $ac_func" 1>&5
+echo "configure:6282: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6281 "configure"
+#line 6287 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6336: checking for $ac_func" 1>&5
+echo "configure:6342: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6341 "configure"
+#line 6347 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6394: checking for $ac_func" 1>&5
+echo "configure:6400: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6399 "configure"
+#line 6405 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6452: checking for $ac_func" 1>&5
+echo "configure:6458: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6457 "configure"
+#line 6463 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6510: checking for $ac_func" 1>&5
+echo "configure:6516: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6515 "configure"
+#line 6521 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6580: checking for $ac_func" 1>&5
+echo "configure:6586: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6585 "configure"
+#line 6591 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6644: checking for $ac_func" 1>&5
+echo "configure:6650: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6649 "configure"
+#line 6655 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
do
ac_ac_var=`echo "ac_cv_func_$ac_func" | $ac_tr_sh`
echo $ac_n "checking for $ac_func... $ac_c" 1>&6
-echo "configure:6704: checking for $ac_func" 1>&5
+echo "configure:6710: checking for $ac_func" 1>&5
if eval "test \"\${$ac_ac_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6709 "configure"
+#line 6715 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
return 0;
}
EOF
-if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6743: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "$ac_ac_var=yes"
else
done
echo $ac_n "checking number of arguments to gettimeofday()... $ac_c" 1>&6
-echo "configure:6759: checking number of arguments to gettimeofday()" 1>&5
+echo "configure:6765: checking number of arguments to gettimeofday()" 1>&5
if test "${ac_cv_func_Xettimeofday_nargs+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6764 "configure"
+#line 6770 "configure"
#include "confdefs.h"
#include <sys/time.h>
int
return 0;
}
EOF
-if { (eval echo configure:6778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_Xettimeofday_nargs=2
else
fi
echo $ac_n "checking number of arguments taken by setpgrp()... $ac_c" 1>&6
-echo "configure:6799: checking number of arguments taken by setpgrp()" 1>&5
+echo "configure:6805: checking number of arguments taken by setpgrp()" 1>&5
if test "${ac_cv_func_setpgrp_nargs+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6804 "configure"
+#line 6810 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
return 0;
}
EOF
-if { (eval echo configure:6822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6828: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_setpgrp_nargs=2
else
CFLAGS="$CFLAGS -I$srcdir/include"
echo $ac_n "checking argument pointer type of qsort()'s compare function and base... $ac_c" 1>&6
-echo "configure:6846: checking argument pointer type of qsort()'s compare function and base" 1>&5
+echo "configure:6852: checking argument pointer type of qsort()'s compare function and base" 1>&5
if test "${ac_cv_func_qsort_argtype+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6851 "configure"
+#line 6857 "configure"
#include "confdefs.h"
#include "l_stdlib.h"
return 0;
}
EOF
-if { (eval echo configure:6878: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_func_qsort_argtype=void
else
CFLAGS=$save_CFLAGS
echo $ac_n "checking if we need to declare 'errno'... $ac_c" 1>&6
-echo "configure:6903: checking if we need to declare 'errno'" 1>&5
+echo "configure:6909: checking if we need to declare 'errno'" 1>&5
if test "${ac_cv_decl_errno+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6908 "configure"
+#line 6914 "configure"
#include "confdefs.h"
#ifdef HAVE_ERRNO_H
#include <errno.h>
return 0;
}
EOF
-if { (eval echo configure:6921: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_errno=no
else
esac
echo $ac_n "checking if we may declare 'h_errno'... $ac_c" 1>&6
-echo "configure:6941: checking if we may declare 'h_errno'" 1>&5
+echo "configure:6947: checking if we may declare 'h_errno'" 1>&5
if test "${ac_cv_decl_h_errno+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6946 "configure"
+#line 6952 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_NETINET_IN_H
return 0;
}
EOF
-if { (eval echo configure:6969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:6975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_h_errno=yes
else
esac
echo $ac_n "checking if declaring 'char *sys_errlist[]' is ok... $ac_c" 1>&6
-echo "configure:6989: checking [if declaring 'char *sys_errlist[]' is ok]" 1>&5
+echo "configure:6995: checking [if declaring 'char *sys_errlist[]' is ok]" 1>&5
if test "${ac_cv_decl_sys_errlist+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 6994 "configure"
+#line 7000 "configure"
#include "confdefs.h"
#include <stdio.h>
#ifdef HAVE_ERRNO_H
return 0;
}
EOF
-if { (eval echo configure:7009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_sys_errlist=yes
else
esac
echo $ac_n "checking if declaring 'syscall()' is ok... $ac_c" 1>&6
-echo "configure:7029: checking if declaring 'syscall()' is ok" 1>&5
+echo "configure:7035: checking if declaring 'syscall()' is ok" 1>&5
if test "${ac_cv_decl_syscall+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 7034 "configure"
+#line 7040 "configure"
#include "confdefs.h"
#ifdef HAVE_SYS_TYPES_H
return 0;
}
EOF
-if { (eval echo configure:7057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:7063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_decl_syscall=yes
else
esac
echo $ac_n "checking if we should use a streams device for ifconfig... $ac_c" 1>&6
-echo "configure:7343: checking if we should use a streams device for ifconfig" 1>&5
+echo "configure:7349: checking if we should use a streams device for ifconfig" 1>&5
if test "${ac_cv_var_use_streams_device_for_ifconfig+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo "$ac_t""$ac_cv_var_use_streams_device_for_ifconfig" 1>&6
echo $ac_n "checking if we need extra room for SO_RCVBUF... $ac_c" 1>&6
-echo "configure:7352: checking if we need extra room for SO_RCVBUF" 1>&5
+echo "configure:7358: checking if we need extra room for SO_RCVBUF" 1>&5
if test "${ac_cv_var_rcvbuf_slop+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we will open the broadcast socket... $ac_c" 1>&6
-echo "configure:7373: checking if we will open the broadcast socket" 1>&5
+echo "configure:7379: checking if we will open the broadcast socket" 1>&5
if test "${ac_cv_var_open_bcast_socket+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we want the HPUX version of FindConfig()... $ac_c" 1>&6
-echo "configure:7397: checking if we want the HPUX version of FindConfig()" 1>&5
+echo "configure:7403: checking if we want the HPUX version of FindConfig()" 1>&5
if test "${ac_cv_var_hpux_findconfig+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if process groups are set with -pid... $ac_c" 1>&6
-echo "configure:7418: checking if process groups are set with -pid" 1>&5
+echo "configure:7424: checking if process groups are set with -pid" 1>&5
if test "${ac_cv_arg_setpgrp_negpid+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we need a ctty for F_SETOWN... $ac_c" 1>&6
-echo "configure:7453: checking if we need a ctty for F_SETOWN" 1>&5
+echo "configure:7459: checking if we need a ctty for F_SETOWN" 1>&5
if test "${ac_cv_func_ctty_for_f_setown+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ntp_warning='GRONK'
echo $ac_n "checking if we'll use clock_settime or settimeofday or stime... $ac_c" 1>&6
-echo "configure:7488: checking if we'll use clock_settime or settimeofday or stime" 1>&5
+echo "configure:7494: checking if we'll use clock_settime or settimeofday or stime" 1>&5
case "$ac_cv_func_clock_settime$ac_cv_func_settimeofday$ac_cv_func_stime" in
yes*)
ntp_warning=''
esac
echo $ac_n "checking if we have a losing syscall()... $ac_c" 1>&6
-echo "configure:7517: checking if we have a losing syscall()" 1>&5
+echo "configure:7523: checking if we have a losing syscall()" 1>&5
if test "${ac_cv_var_syscall_bug+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for Streams/TLI... $ac_c" 1>&6
-echo "configure:7539: checking for Streams/TLI" 1>&5
+echo "configure:7545: checking for Streams/TLI" 1>&5
if test "${ac_cv_var_streams_tli+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for SIGIO... $ac_c" 1>&6
-echo "configure:7567: checking for SIGIO" 1>&5
+echo "configure:7573: checking for SIGIO" 1>&5
if test "${ac_cv_hdr_def_sigio+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 7572 "configure"
+#line 7578 "configure"
#include "confdefs.h"
#include <signal.h>
#ifdef SIGIO
echo "$ac_t""$ac_cv_hdr_def_sigio" 1>&6
echo $ac_n "checking if we want to use signalled IO... $ac_c" 1>&6
-echo "configure:7594: checking if we want to use signalled IO" 1>&5
+echo "configure:7600: checking if we want to use signalled IO" 1>&5
if test "${ac_cv_var_signalled_io+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for SIGPOLL... $ac_c" 1>&6
-echo "configure:7644: checking for SIGPOLL" 1>&5
+echo "configure:7650: checking for SIGPOLL" 1>&5
if test "${ac_cv_hdr_def_sigpoll+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 7649 "configure"
+#line 7655 "configure"
#include "confdefs.h"
#include <signal.h>
#ifdef SIGPOLL
echo "$ac_t""$ac_cv_hdr_def_sigpoll" 1>&6
echo $ac_n "checking for SIGSYS... $ac_c" 1>&6
-echo "configure:7671: checking for SIGSYS" 1>&5
+echo "configure:7677: checking for SIGSYS" 1>&5
if test "${ac_cv_hdr_def_sigsys+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 7676 "configure"
+#line 7682 "configure"
#include "confdefs.h"
#include <signal.h>
#ifdef SIGSYS
echo "$ac_t""$ac_cv_hdr_def_sigsys" 1>&6
echo $ac_n "checking if we can use SIGPOLL for UDP I/O... $ac_c" 1>&6
-echo "configure:7698: checking if we can use SIGPOLL for UDP I/O" 1>&5
+echo "configure:7704: checking if we can use SIGPOLL for UDP I/O" 1>&5
if test "${ac_cv_var_use_udp_sigpoll+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we can use SIGPOLL for TTY I/O... $ac_c" 1>&6
-echo "configure:7752: checking if we can use SIGPOLL for TTY I/O" 1>&5
+echo "configure:7758: checking if we can use SIGPOLL for TTY I/O" 1>&5
if test "${ac_cv_var_use_tty_sigpoll+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$ac_cv_header_sys_sio_h" in
yes)
echo $ac_n "checking sys/sio.h for TIOCDCDTIMESTAMP... $ac_c" 1>&6
-echo "configure:7808: checking sys/sio.h for TIOCDCDTIMESTAMP" 1>&5
+echo "configure:7814: checking sys/sio.h for TIOCDCDTIMESTAMP" 1>&5
if test "${ac_cv_hdr_def_tiocdcdtimestamp+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 7813 "configure"
+#line 7819 "configure"
#include "confdefs.h"
#include <sys/sio.h>
#ifdef TIOCDCDTIMESTAMP
esac
echo $ac_n "checking if nlist() values might require extra indirection... $ac_c" 1>&6
-echo "configure:7843: checking if nlist() values might require extra indirection" 1>&5
+echo "configure:7849: checking if nlist() values might require extra indirection" 1>&5
if test "${ac_cv_var_nlist_extra_indirection+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for a minimum recommended value of tickadj... $ac_c" 1>&6
-echo "configure:7864: checking for a minimum recommended value of tickadj" 1>&5
+echo "configure:7870: checking for a minimum recommended value of tickadj" 1>&5
if test "${ac_cv_var_min_rec_tickadj+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if the TTY code permits PARENB and IGNPAR... $ac_c" 1>&6
-echo "configure:7886: checking if the TTY code permits PARENB and IGNPAR" 1>&5
+echo "configure:7892: checking if the TTY code permits PARENB and IGNPAR" 1>&5
if test "${ac_cv_var_no_parenb_ignpar+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we're including debugging code... $ac_c" 1>&6
-echo "configure:7910: checking if we're including debugging code" 1>&5
+echo "configure:7916: checking if we're including debugging code" 1>&5
# Check whether --enable-debugging or --disable-debugging was given.
if test "${enable_debugging+set}" = set; then
enableval="$enable_debugging"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking for a the number of minutes in a DST adjustment... $ac_c" 1>&6
-echo "configure:7928: checking for a the number of minutes in a DST adjustment" 1>&5
+echo "configure:7934: checking for a the number of minutes in a DST adjustment" 1>&5
# Check whether --enable-dst_minutes or --disable-dst_minutes was given.
if test "${enable_dst_minutes+set}" = set; then
enableval="$enable_dst_minutes"
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we have the tty_clk line discipline/streams module... $ac_c" 1>&6
-echo "configure:7944: checking if we have the tty_clk line discipline/streams module" 1>&5
+echo "configure:7950: checking if we have the tty_clk line discipline/streams module" 1>&5
if test "${ac_cv_var_tty_clk+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for the ppsclock streams module... $ac_c" 1>&6
-echo "configure:7961: checking for the ppsclock streams module" 1>&5
+echo "configure:7967: checking for the ppsclock streams module" 1>&5
if test "${ac_cv_var_ppsclock+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for kernel multicast support... $ac_c" 1>&6
-echo "configure:7976: checking for kernel multicast support" 1>&5
+echo "configure:7982: checking for kernel multicast support" 1>&5
if test "${ac_cv_var_mcast+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$target" in
i386-sequent-sysv4) ;;
*) cat >conftest.$ac_ext <<EOF
-#line 7984 "configure"
+#line 7990 "configure"
#include "confdefs.h"
#include <netinet/in.h>
#ifdef IP_ADD_MEMBERSHIP
esac
echo $ac_n "checking availability of ntp_{adj,get}time()... $ac_c" 1>&6
-echo "configure:8010: checking [availability of ntp_{adj,get}time()]" 1>&5
+echo "configure:8016: checking [availability of ntp_{adj,get}time()]" 1>&5
if test "${ac_cv_var_ntp_syscalls+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_var_ntp_syscalls=libc
;;
*) cat >conftest.$ac_ext <<EOF
-#line 8024 "configure"
+#line 8030 "configure"
#include "confdefs.h"
#include <sys/syscall.h>
#if defined(SYS_ntp_gettime) && defined(SYS_ntp_adjtime)
esac
echo $ac_n "checking if sys/timex.h has STA_FLL... $ac_c" 1>&6
-echo "configure:8063: checking if sys/timex.h has STA_FLL" 1>&5
+echo "configure:8069: checking if sys/timex.h has STA_FLL" 1>&5
if test "${ac_cv_var_sta_fll+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8068 "configure"
+#line 8074 "configure"
#include "confdefs.h"
#include <sys/timex.h>
#ifdef STA_FLL
echo "$ac_t""$ac_cv_var_sta_fll" 1>&6
echo $ac_n "checking if we have kernel PLL support... $ac_c" 1>&6
-echo "configure:8090: checking if we have kernel PLL support" 1>&5
+echo "configure:8096: checking if we have kernel PLL support" 1>&5
if test "${ac_cv_var_kernel_pll+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if SIOCGIFCONF returns buffer size in the buffer... $ac_c" 1>&6
-echo "configure:8113: checking if SIOCGIFCONF returns buffer size in the buffer" 1>&5
+echo "configure:8119: checking if SIOCGIFCONF returns buffer size in the buffer" 1>&5
if test "${ac_cv_var_size_returned_in_buffer+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we want to use MD5 authentication... $ac_c" 1>&6
-echo "configure:8140: checking if we want to use MD5 authentication" 1>&5
+echo "configure:8146: checking if we want to use MD5 authentication" 1>&5
if test "${ac_cv_var_use_md5+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Check for ioctls TIOCGPPSEV
echo $ac_n "checking ioctl TIOCGPPSEV... $ac_c" 1>&6
-echo "configure:8164: checking ioctl TIOCGPPSEV" 1>&5
+echo "configure:8170: checking ioctl TIOCGPPSEV" 1>&5
if test "$ac_cv_header_termios_h" = "yes"; then
cat >conftest.$ac_ext <<EOF
-#line 8167 "configure"
+#line 8173 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef TIOCGPPSEV
# Check for ioctls TIOCSPPS
echo $ac_n "checking ioctl TIOCSPPS... $ac_c" 1>&6
-echo "configure:8199: checking ioctl TIOCSPPS" 1>&5
+echo "configure:8205: checking ioctl TIOCSPPS" 1>&5
if test "$ac_cv_header_termios_h" = "yes"; then
cat >conftest.$ac_ext <<EOF
-#line 8202 "configure"
+#line 8208 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef TIOCSPPS
# Check for ioctls CIOGETEV
echo $ac_n "checking ioctl CIOGETEV... $ac_c" 1>&6
-echo "configure:8234: checking ioctl CIOGETEV" 1>&5
+echo "configure:8240: checking ioctl CIOGETEV" 1>&5
if test "$ac_cv_header_sys_ppsclock_h" = "yes"; then
cat >conftest.$ac_ext <<EOF
-#line 8237 "configure"
+#line 8243 "configure"
#include "confdefs.h"
#include <sys/ppsclock.h>
#ifdef CIOGETEV
# Check for ioctls TIOCGSERIAL, TIOCSSERIAL, ASYNC_PPS_CD_POS, ASYNC_PPS_CD_NEG
echo $ac_n "checking for linux/serial.h... $ac_c" 1>&6
-echo "configure:8287: checking for linux/serial.h" 1>&5
+echo "configure:8293: checking for linux/serial.h" 1>&5
if test "${ac_cv_header_linux_serial_h+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8292 "configure"
+#line 8298 "configure"
#include "confdefs.h"
#include <linux/serial.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:8298: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:8304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
echo "$ac_t""$ac_cv_header_linux_serial_h" 1>&6
echo $ac_n "checking ioctl TIOCGSERIAL... $ac_c" 1>&6
-echo "configure:8315: checking ioctl TIOCGSERIAL" 1>&5
+echo "configure:8321: checking ioctl TIOCGSERIAL" 1>&5
case "$ac_cv_header_sys_ppsclock_h$ac_cv_header_linux_serial_h" in
yesyes)
cat >conftest.$ac_ext <<EOF
-#line 8319 "configure"
+#line 8325 "configure"
#include "confdefs.h"
#include <sys/time.h>
typedef int u_int;
# Check for SHMEM_STATUS support
echo $ac_n "checking SHMEM_STATUS support... $ac_c" 1>&6
-echo "configure:8362: checking SHMEM_STATUS support" 1>&5
+echo "configure:8368: checking SHMEM_STATUS support" 1>&5
case "$ac_cv_header_sys_mman_h" in
yes) ntp_ok=yes ;;
*) ntp_ok=no ;;
# HPUX only, and by explicit request
echo $ac_n "checking Datum/Bancomm bc635/VME interface... $ac_c" 1>&6
-echo "configure:8379: checking Datum/Bancomm bc635/VME interface" 1>&5
+echo "configure:8385: checking Datum/Bancomm bc635/VME interface" 1>&5
# Check whether --enable-BANCOMM or --disable-BANCOMM was given.
if test "${enable_BANCOMM+set}" = set; then
enableval="$enable_BANCOMM"
#HPUX only, and only by explicit request
echo $ac_n "checking TrueTime GPS receiver/VME interface... $ac_c" 1>&6
-echo "configure:8403: checking TrueTime GPS receiver/VME interface" 1>&5
+echo "configure:8409: checking TrueTime GPS receiver/VME interface" 1>&5
# Check whether --enable-GPSVME or --disable-GPSVME was given.
if test "${enable_GPSVME+set}" = set; then
enableval="$enable_GPSVME"
esac
echo $ac_n "checking for PCL720 clock support... $ac_c" 1>&6
-echo "configure:8426: checking for PCL720 clock support" 1>&5
+echo "configure:8432: checking for PCL720 clock support" 1>&5
case "$ac_cv_header_machine_inline_h$ac_cv_header_sys_pcl720_h$ac_cv_header_sys_i8253_h" in
yesyesyes)
cat >>confdefs.h <<\EOF
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking for SHM clock attached thru shared memory... $ac_c" 1>&6
-echo "configure:8442: checking for SHM clock attached thru shared memory" 1>&5
+echo "configure:8448: checking for SHM clock attached thru shared memory" 1>&5
# Check whether --enable-SHM or --disable-SHM was given.
if test "${enable_SHM+set}" = set; then
enableval="$enable_SHM"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking for default inclusion of all suitable non-PARSE clocks... $ac_c" 1>&6
-echo "configure:8461: checking for default inclusion of all suitable non-PARSE clocks" 1>&5
+echo "configure:8467: checking for default inclusion of all suitable non-PARSE clocks" 1>&5
# Check whether --enable-all-clocks or --disable-all-clocks was given.
if test "${enable_all_clocks+set}" = set; then
enableval="$enable_all_clocks"
echo "$ac_t""$ntp_eac" 1>&6
echo $ac_n "checking if we have support for PARSE clocks... $ac_c" 1>&6
-echo "configure:8473: checking if we have support for PARSE clocks" 1>&5
+echo "configure:8479: checking if we have support for PARSE clocks" 1>&5
case "$ac_cv_header_termio_h$ac_cv_header_termios_h" in
*yes*)
ntp_canparse=yes
echo "$ac_t""$ntp_canparse" 1>&6
echo $ac_n "checking if we have support for audio clocks... $ac_c" 1>&6
-echo "configure:8484: checking if we have support for audio clocks" 1>&5
+echo "configure:8490: checking if we have support for audio clocks" 1>&5
case "$ac_cv_header_sun_audioio_h$ac_cv_header_sys_audioio_h" in
*yes*) ntp_canaudio=yes ;;
*) ntp_canaudio=no ;;
echo "$ac_t""$ntp_canaudio" 1>&6
echo $ac_n "checking for struct audio_info.monitor_gain... $ac_c" 1>&6
-echo "configure:8492: checking for struct audio_info.monitor_gain" 1>&5
+echo "configure:8498: checking for struct audio_info.monitor_gain" 1>&5
if test "${ac_cv_member_struct_audio_info_monitor_gain+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8497 "configure"
+#line 8503 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8515: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_monitor_gain=yes
else
fi
echo $ac_n "checking for struct audio_info.output_muted... $ac_c" 1>&6
-echo "configure:8535: checking for struct audio_info.output_muted" 1>&5
+echo "configure:8541: checking for struct audio_info.output_muted" 1>&5
if test "${ac_cv_member_struct_audio_info_output_muted+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8540 "configure"
+#line 8546 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_output_muted=yes
else
fi
echo $ac_n "checking for struct audio_info.blocksize... $ac_c" 1>&6
-echo "configure:8578: checking for struct audio_info.blocksize" 1>&5
+echo "configure:8584: checking for struct audio_info.blocksize" 1>&5
if test "${ac_cv_member_struct_audio_info_blocksize+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8583 "configure"
+#line 8589 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8601: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8607: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_blocksize=yes
else
fi
echo $ac_n "checking for struct audio_info.hiwat... $ac_c" 1>&6
-echo "configure:8621: checking for struct audio_info.hiwat" 1>&5
+echo "configure:8627: checking for struct audio_info.hiwat" 1>&5
if test "${ac_cv_member_struct_audio_info_hiwat+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8626 "configure"
+#line 8632 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8644: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8650: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_hiwat=yes
else
fi
echo $ac_n "checking for struct audio_info.lowat... $ac_c" 1>&6
-echo "configure:8664: checking for struct audio_info.lowat" 1>&5
+echo "configure:8670: checking for struct audio_info.lowat" 1>&5
if test "${ac_cv_member_struct_audio_info_lowat+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8669 "configure"
+#line 8675 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_lowat=yes
else
fi
echo $ac_n "checking for struct audio_info.mode... $ac_c" 1>&6
-echo "configure:8707: checking for struct audio_info.mode" 1>&5
+echo "configure:8713: checking for struct audio_info.mode" 1>&5
if test "${ac_cv_member_struct_audio_info_mode+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat >conftest.$ac_ext <<EOF
-#line 8712 "configure"
+#line 8718 "configure"
#include "confdefs.h"
#ifdef HAVE_SUN_AUDIO_H
#include <sun/audio.h>
return 0;
}
EOF
-if { (eval echo configure:8730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:8736: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_member_struct_audio_info_mode=yes
else
# Requires modem control
echo $ac_n "checking ACTS modem service... $ac_c" 1>&6
-echo "configure:8751: checking ACTS modem service" 1>&5
+echo "configure:8757: checking ACTS modem service" 1>&5
# Check whether --enable-ACTS or --disable-ACTS was given.
if test "${enable_ACTS+set}" = set; then
enableval="$enable_ACTS"
ntp_ok=$enableval
else
cat >conftest.$ac_ext <<EOF
-#line 8758 "configure"
+#line 8764 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Arbiter 1088A/B GPS receiver... $ac_c" 1>&6
-echo "configure:8791: checking Arbiter 1088A/B GPS receiver" 1>&5
+echo "configure:8797: checking Arbiter 1088A/B GPS receiver" 1>&5
# Check whether --enable-ARBITER or --disable-ARBITER was given.
if test "${enable_ARBITER+set}" = set; then
enableval="$enable_ARBITER"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Arcron MSF receiver... $ac_c" 1>&6
-echo "configure:8810: checking Arcron MSF receiver" 1>&5
+echo "configure:8816: checking Arcron MSF receiver" 1>&5
# Check whether --enable-ARCRON_MSF or --disable-ARCRON_MSF was given.
if test "${enable_ARCRON_MSF+set}" = set; then
enableval="$enable_ARCRON_MSF"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Austron 2200A/2201A GPS receiver... $ac_c" 1>&6
-echo "configure:8829: checking Austron 2200A/2201A GPS receiver" 1>&5
+echo "configure:8835: checking Austron 2200A/2201A GPS receiver" 1>&5
# Check whether --enable-AS2201 or --disable-AS2201 was given.
if test "${enable_AS2201+set}" = set; then
enableval="$enable_AS2201"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking PPS interface... $ac_c" 1>&6
-echo "configure:8848: checking PPS interface" 1>&5
+echo "configure:8854: checking PPS interface" 1>&5
# Check whether --enable-ATOM or --disable-ATOM was given.
if test "${enable_ATOM+set}" = set; then
enableval="$enable_ATOM"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking CHU modem/decoder... $ac_c" 1>&6
-echo "configure:8867: checking CHU modem/decoder" 1>&5
+echo "configure:8873: checking CHU modem/decoder" 1>&5
# Check whether --enable-CHU or --disable-CHU was given.
if test "${enable_CHU+set}" = set; then
enableval="$enable_CHU"
ac_refclock_chu=$ntp_ok
echo $ac_n "checking CHU audio/decoder... $ac_c" 1>&6
-echo "configure:8887: checking CHU audio/decoder" 1>&5
+echo "configure:8893: checking CHU audio/decoder" 1>&5
# Check whether --enable-AUDIO-CHU or --disable-AUDIO-CHU was given.
if test "${enable_AUDIO_CHU+set}" = set; then
enableval="$enable_AUDIO_CHU"
# Not under HP-UX
echo $ac_n "checking Datum Programmable Time System... $ac_c" 1>&6
-echo "configure:8913: checking Datum Programmable Time System" 1>&5
+echo "configure:8919: checking Datum Programmable Time System" 1>&5
# Check whether --enable-DATUM or --disable-DATUM was given.
if test "${enable_DATUM+set}" = set; then
enableval="$enable_DATUM"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Forum Graphic GPS... $ac_c" 1>&6
-echo "configure:8938: checking Forum Graphic GPS" 1>&5
+echo "configure:8944: checking Forum Graphic GPS" 1>&5
# Check whether --enable-FG or --disable-FG was given.
if test "${enable_FG+set}" = set; then
enableval="$enable_FG"
# Requires modem control
echo $ac_n "checking Heath GC-1000 WWV/WWVH receiver... $ac_c" 1>&6
-echo "configure:8958: checking Heath GC-1000 WWV/WWVH receiver" 1>&5
+echo "configure:8964: checking Heath GC-1000 WWV/WWVH receiver" 1>&5
# Check whether --enable-HEATH or --disable-HEATH was given.
if test "${enable_HEATH+set}" = set; then
enableval="$enable_HEATH"
ntp_ok=$enableval
else
cat >conftest.$ac_ext <<EOF
-#line 8965 "configure"
+#line 8971 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking HP 58503A GPS receiver... $ac_c" 1>&6
-echo "configure:8998: checking HP 58503A GPS receiver" 1>&5
+echo "configure:9004: checking HP 58503A GPS receiver" 1>&5
# Check whether --enable-HPGPS or --disable-HPGPS was given.
if test "${enable_HPGPS+set}" = set; then
enableval="$enable_HPGPS"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Sun IRIG audio decoder... $ac_c" 1>&6
-echo "configure:9017: checking Sun IRIG audio decoder" 1>&5
+echo "configure:9023: checking Sun IRIG audio decoder" 1>&5
# Check whether --enable-IRIG or --disable-IRIG was given.
if test "${enable_IRIG+set}" = set; then
enableval="$enable_IRIG"
esac
echo $ac_n "checking Leitch CSD 5300 Master Clock System Driver... $ac_c" 1>&6
-echo "configure:9042: checking Leitch CSD 5300 Master Clock System Driver" 1>&5
+echo "configure:9048: checking Leitch CSD 5300 Master Clock System Driver" 1>&5
# Check whether --enable-LEITCH or --disable-LEITCH was given.
if test "${enable_LEITCH+set}" = set; then
enableval="$enable_LEITCH"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking local clock reference... $ac_c" 1>&6
-echo "configure:9061: checking local clock reference" 1>&5
+echo "configure:9067: checking local clock reference" 1>&5
# Check whether --enable-LOCAL-CLOCK or --disable-LOCAL-CLOCK was given.
if test "${enable_LOCAL_CLOCK+set}" = set; then
enableval="$enable_LOCAL_CLOCK"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking EES M201 MSF receiver... $ac_c" 1>&6
-echo "configure:9080: checking EES M201 MSF receiver" 1>&5
+echo "configure:9086: checking EES M201 MSF receiver" 1>&5
# Check whether --enable-MSFEES or --disable-MSFEES was given.
if test "${enable_MSFEES+set}" = set; then
enableval="$enable_MSFEES"
# Not Ultrix
echo $ac_n "checking Magnavox MX4200 GPS receiver... $ac_c" 1>&6
-echo "configure:9100: checking Magnavox MX4200 GPS receiver" 1>&5
+echo "configure:9106: checking Magnavox MX4200 GPS receiver" 1>&5
# Check whether --enable-MX4200 or --disable-MX4200 was given.
if test "${enable_MX4200+set}" = set; then
enableval="$enable_MX4200"
esac
echo $ac_n "checking NMEA GPS receiver... $ac_c" 1>&6
-echo "configure:9127: checking NMEA GPS receiver" 1>&5
+echo "configure:9133: checking NMEA GPS receiver" 1>&5
# Check whether --enable-NMEA or --disable-NMEA was given.
if test "${enable_NMEA+set}" = set; then
enableval="$enable_NMEA"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking for ONCORE Motorola VP/UT Oncore GPS... $ac_c" 1>&6
-echo "configure:9146: checking for ONCORE Motorola VP/UT Oncore GPS" 1>&5
+echo "configure:9152: checking for ONCORE Motorola VP/UT Oncore GPS" 1>&5
# Check whether --enable-ONCORE or --disable-ONCORE was given.
if test "${enable_ONCORE+set}" = set; then
enableval="$enable_ONCORE"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking for Palisade clock... $ac_c" 1>&6
-echo "configure:9168: checking for Palisade clock" 1>&5
+echo "configure:9174: checking for Palisade clock" 1>&5
# Check whether --enable-PALISADE or --disable-PALISADE was given.
if test "${enable_PALISADE+set}" = set; then
enableval="$enable_PALISADE"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking PST/Traconex 1020 WWV/WWVH receiver... $ac_c" 1>&6
-echo "configure:9193: checking PST/Traconex 1020 WWV/WWVH receiver" 1>&5
+echo "configure:9199: checking PST/Traconex 1020 WWV/WWVH receiver" 1>&5
# Check whether --enable-PST or --disable-PST was given.
if test "${enable_PST+set}" = set; then
enableval="$enable_PST"
# Not Ultrix
echo $ac_n "checking Rockwell Jupiter GPS receiver... $ac_c" 1>&6
-echo "configure:9213: checking Rockwell Jupiter GPS receiver" 1>&5
+echo "configure:9219: checking Rockwell Jupiter GPS receiver" 1>&5
# Check whether --enable-JUPITER or --disable-JUPITER was given.
if test "${enable_JUPITER+set}" = set; then
enableval="$enable_JUPITER"
# Requires modem control
echo $ac_n "checking PTB modem service... $ac_c" 1>&6
-echo "configure:9241: checking PTB modem service" 1>&5
+echo "configure:9247: checking PTB modem service" 1>&5
# Check whether --enable-PTBACTS or --disable-PTBACTS was given.
if test "${enable_PTBACTS+set}" = set; then
enableval="$enable_PTBACTS"
ntp_ok=$enableval
else
cat >conftest.$ac_ext <<EOF
-#line 9248 "configure"
+#line 9254 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking KSI/Odetics TPRO/S GPS receiver/IRIG interface... $ac_c" 1>&6
-echo "configure:9281: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" 1>&5
+echo "configure:9287: checking KSI/Odetics TPRO/S GPS receiver/IRIG interface" 1>&5
# Check whether --enable-TPRO or --disable-TPRO was given.
if test "${enable_TPRO+set}" = set; then
enableval="$enable_TPRO"
esac
echo $ac_n "checking TRAK 8810 GPS receiver... $ac_c" 1>&6
-echo "configure:9309: checking TRAK 8810 GPS receiver" 1>&5
+echo "configure:9315: checking TRAK 8810 GPS receiver" 1>&5
# Check whether --enable-TRAK or --disable-TRAK was given.
if test "${enable_TRAK+set}" = set; then
enableval="$enable_TRAK"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Chrono-log K-series WWVB receiver... $ac_c" 1>&6
-echo "configure:9328: checking Chrono-log K-series WWVB receiver" 1>&5
+echo "configure:9334: checking Chrono-log K-series WWVB receiver" 1>&5
# Check whether --enable-CHRONOLOG or --disable-CHRONOLOG was given.
if test "${enable_CHRONOLOG+set}" = set; then
enableval="$enable_CHRONOLOG"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Dumb generic hh:mm:ss local clock... $ac_c" 1>&6
-echo "configure:9347: checking Dumb generic hh:mm:ss local clock" 1>&5
+echo "configure:9353: checking Dumb generic hh:mm:ss local clock" 1>&5
# Check whether --enable-DUMBCLOCK or --disable-DUMBCLOCK was given.
if test "${enable_DUMBCLOCK+set}" = set; then
enableval="$enable_DUMBCLOCK"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Conrad parallel port radio clock... $ac_c" 1>&6
-echo "configure:9366: checking Conrad parallel port radio clock" 1>&5
+echo "configure:9372: checking Conrad parallel port radio clock" 1>&5
# Check whether --enable-PCF or --disable-PCF was given.
if test "${enable_PCF+set}" = set; then
enableval="$enable_PCF"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking Spectracom 8170/Netclock/2 WWVB receiver... $ac_c" 1>&6
-echo "configure:9385: checking Spectracom 8170/Netclock/2 WWVB receiver" 1>&5
+echo "configure:9391: checking Spectracom 8170/Netclock/2 WWVB receiver" 1>&5
# Check whether --enable-SPECTRACOM or --disable-SPECTRACOM was given.
if test "${enable_SPECTRACOM+set}" = set; then
enableval="$enable_SPECTRACOM"
# Not on a vax-dec-bsd
echo $ac_n "checking Kinemetrics/TrueTime receivers... $ac_c" 1>&6
-echo "configure:9405: checking Kinemetrics/TrueTime receivers" 1>&5
+echo "configure:9411: checking Kinemetrics/TrueTime receivers" 1>&5
# Check whether --enable-TRUETIME or --disable-TRUETIME was given.
if test "${enable_TRUETIME+set}" = set; then
enableval="$enable_TRUETIME"
esac
echo $ac_n "checking Ultralink M320 WWVB receiver... $ac_c" 1>&6
-echo "configure:9434: checking Ultralink M320 WWVB receiver" 1>&5
+echo "configure:9440: checking Ultralink M320 WWVB receiver" 1>&5
# Check whether --enable-ULINK or --disable-ULINK was given.
if test "${enable_ULINK+set}" = set; then
enableval="$enable_ULINK"
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking WWV receiver... $ac_c" 1>&6
-echo "configure:9453: checking WWV receiver" 1>&5
+echo "configure:9459: checking WWV receiver" 1>&5
# Check whether --enable-WWV or --disable-WWV was given.
if test "${enable_WWV+set}" = set; then
enableval="$enable_WWV"
# Requires modem control
echo $ac_n "checking USNO modem service... $ac_c" 1>&6
-echo "configure:9479: checking USNO modem service" 1>&5
+echo "configure:9485: checking USNO modem service" 1>&5
# Check whether --enable-USNO or --disable-USNO was given.
if test "${enable_USNO+set}" = set; then
enableval="$enable_USNO"
ntp_ok=$enableval
else
cat >conftest.$ac_ext <<EOF
-#line 9486 "configure"
+#line 9492 "configure"
#include "confdefs.h"
#include <termios.h>
#ifdef HAVE_SYS_IOCTL_H
echo "$ac_t""$ntp_ok" 1>&6
echo $ac_n "checking for default inclusion of all suitable PARSE clocks... $ac_c" 1>&6
-echo "configure:9519: checking for default inclusion of all suitable PARSE clocks" 1>&5
+echo "configure:9525: checking for default inclusion of all suitable PARSE clocks" 1>&5
# Check whether --enable-parse-clocks or --disable-parse-clocks was given.
if test "${enable_parse_clocks+set}" = set; then
enableval="$enable_parse_clocks"
ntp_rawdcf=no
echo $ac_n "checking Diem Computime Radio Clock... $ac_c" 1>&6
-echo "configure:9549: checking Diem Computime Radio Clock" 1>&5
+echo "configure:9555: checking Diem Computime Radio Clock" 1>&5
# Check whether --enable-COMPUTIME or --disable-COMPUTIME was given.
if test "${enable_COMPUTIME+set}" = set; then
enableval="$enable_COMPUTIME"
esac
echo $ac_n "checking ELV/DCF7000 clock... $ac_c" 1>&6
-echo "configure:9574: checking ELV/DCF7000 clock" 1>&5
+echo "configure:9580: checking ELV/DCF7000 clock" 1>&5
# Check whether --enable-DCF7000 or --disable-DCF7000 was given.
if test "${enable_DCF7000+set}" = set; then
enableval="$enable_DCF7000"
esac
echo $ac_n "checking HOPF 6021 clock... $ac_c" 1>&6
-echo "configure:9599: checking HOPF 6021 clock" 1>&5
+echo "configure:9605: checking HOPF 6021 clock" 1>&5
# Check whether --enable-HOPF6021 or --disable-HOPF6021 was given.
if test "${enable_HOPF6021+set}" = set; then
enableval="$enable_HOPF6021"
esac
echo $ac_n "checking Meinberg clocks... $ac_c" 1>&6
-echo "configure:9624: checking Meinberg clocks" 1>&5
+echo "configure:9630: checking Meinberg clocks" 1>&5
# Check whether --enable-MEINBERG or --disable-MEINBERG was given.
if test "${enable_MEINBERG+set}" = set; then
enableval="$enable_MEINBERG"
esac
echo $ac_n "checking DCF77 raw time code... $ac_c" 1>&6
-echo "configure:9649: checking DCF77 raw time code" 1>&5
+echo "configure:9655: checking DCF77 raw time code" 1>&5
# Check whether --enable-RAWDCF or --disable-RAWDCF was given.
if test "${enable_RAWDCF+set}" = set; then
enableval="$enable_RAWDCF"
case "$ntp_rawdcf" in
yes)
echo $ac_n "checking if we must enable parity for RAWDCF... $ac_c" 1>&6
-echo "configure:9678: checking if we must enable parity for RAWDCF" 1>&5
+echo "configure:9684: checking if we must enable parity for RAWDCF" 1>&5
if test "${ac_cv_var_rawdcf_parity+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking RCC 8000 clock... $ac_c" 1>&6
-echo "configure:9705: checking RCC 8000 clock" 1>&5
+echo "configure:9711: checking RCC 8000 clock" 1>&5
# Check whether --enable-RCC8000 or --disable-RCC8000 was given.
if test "${enable_RCC8000+set}" = set; then
enableval="$enable_RCC8000"
esac
echo $ac_n "checking Schmid DCF77 clock... $ac_c" 1>&6
-echo "configure:9730: checking Schmid DCF77 clock" 1>&5
+echo "configure:9736: checking Schmid DCF77 clock" 1>&5
# Check whether --enable-SCHMID or --disable-SCHMID was given.
if test "${enable_SCHMID+set}" = set; then
enableval="$enable_SCHMID"
esac
echo $ac_n "checking Trimble GPS receiver/TAIP protocol... $ac_c" 1>&6
-echo "configure:9755: checking Trimble GPS receiver/TAIP protocol" 1>&5
+echo "configure:9761: checking Trimble GPS receiver/TAIP protocol" 1>&5
# Check whether --enable-TRIMTAIP or --disable-TRIMTAIP was given.
if test "${enable_TRIMTAIP+set}" = set; then
enableval="$enable_TRIMTAIP"
esac
echo $ac_n "checking Trimble GPS receiver/TSIP protocol... $ac_c" 1>&6
-echo "configure:9780: checking Trimble GPS receiver/TSIP protocol" 1>&5
+echo "configure:9786: checking Trimble GPS receiver/TSIP protocol" 1>&5
# Check whether --enable-TRIMTSIP or --disable-TRIMTSIP was given.
if test "${enable_TRIMTSIP+set}" = set; then
enableval="$enable_TRIMTSIP"
esac
echo $ac_n "checking WHARTON 400A Series clock... $ac_c" 1>&6
-echo "configure:9805: checking WHARTON 400A Series clock" 1>&5
+echo "configure:9811: checking WHARTON 400A Series clock" 1>&5
# Check whether --enable-WHARTON or --disable-WHARTON was given.
if test "${enable_WHARTON+set}" = set; then
enableval="$enable_WHARTON"
esac
echo $ac_n "checking VARITEXT clock... $ac_c" 1>&6
-echo "configure:9830: checking VARITEXT clock" 1>&5
+echo "configure:9836: checking VARITEXT clock" 1>&5
# Check whether --enable-VARITEXT or --disable-VARITEXT was given.
if test "${enable_VARITEXT+set}" = set; then
enableval="$enable_VARITEXT"
esac
echo $ac_n "checking if we need to make and use the parse libraries... $ac_c" 1>&6
-echo "configure:9855: checking if we need to make and use the parse libraries" 1>&5
+echo "configure:9861: checking if we need to make and use the parse libraries" 1>&5
ans=no
case "$ntp_libparse" in
yes)
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we need to make and use the RSAREF library... $ac_c" 1>&6
-echo "configure:9880: checking if we need to make and use the RSAREF library" 1>&5
+echo "configure:9886: checking if we need to make and use the RSAREF library" 1>&5
ans=no
if test -f $srcdir/rsaref2/source/rsa.c
then
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we can make dcf parse utilities... $ac_c" 1>&6
-echo "configure:9895: checking if we can make dcf parse utilities" 1>&5
+echo "configure:9901: checking if we can make dcf parse utilities" 1>&5
ans=no
if test "$ntp_parseutil" = "yes"; then
case "$target" in
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we can build kernel streams modules for parse... $ac_c" 1>&6
-echo "configure:9909: checking if we can build kernel streams modules for parse" 1>&5
+echo "configure:9915: checking if we can build kernel streams modules for parse" 1>&5
ans=no
case "$ntp_parseutil$ac_cv_header_sys_stropts_h" in
yesyes)
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we need basic refclock support... $ac_c" 1>&6
-echo "configure:9936: checking if we need basic refclock support" 1>&5
+echo "configure:9942: checking if we need basic refclock support" 1>&5
if test "$ntp_refclock" = "yes"; then
cat >>confdefs.h <<\EOF
#define REFCLOCK 1
echo $ac_n "checking if we want HP-UX adjtimed support... $ac_c" 1>&6
-echo "configure:9948: checking if we want HP-UX adjtimed support" 1>&5
+echo "configure:9954: checking if we want HP-UX adjtimed support" 1>&5
case "$target" in
*-*-hpux[56789]*)
ans=yes
echo "$ac_t""$ans" 1>&6
echo $ac_n "checking if we can read kmem... $ac_c" 1>&6
-echo "configure:9966: checking if we can read kmem" 1>&5
+echo "configure:9972: checking if we can read kmem" 1>&5
if test "${ac_cv_var_can_kmem+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if adjtime is accurate... $ac_c" 1>&6
-echo "configure:10018: checking if adjtime is accurate" 1>&5
+echo "configure:10024: checking if adjtime is accurate" 1>&5
if test "${ac_cv_var_adjtime_is_accurate+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking the name of 'tick' in the kernel... $ac_c" 1>&6
-echo "configure:10069: checking the name of 'tick' in the kernel" 1>&5
+echo "configure:10075: checking the name of 'tick' in the kernel" 1>&5
if test "${ac_cv_var_nlist_tick+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
#
echo $ac_n "checking for the units of 'tick'... $ac_c" 1>&6
-echo "configure:10112: checking for the units of 'tick'" 1>&5
+echo "configure:10118: checking for the units of 'tick'" 1>&5
if test "${ac_cv_var_tick_nano+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
#
echo $ac_n "checking the name of 'tickadj' in the kernel... $ac_c" 1>&6
-echo "configure:10135: checking the name of 'tickadj' in the kernel" 1>&5
+echo "configure:10141: checking the name of 'tickadj' in the kernel" 1>&5
if test "${ac_cv_var_nlist_tickadj+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
#
echo $ac_n "checking for the units of 'tickadj'... $ac_c" 1>&6
-echo "configure:10187: checking for the units of 'tickadj'" 1>&5
+echo "configure:10193: checking for the units of 'tickadj'" 1>&5
if test "${ac_cv_var_tickadj_nano+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
#
echo $ac_n "checking half-heartedly for 'dosynctodr' in the kernel... $ac_c" 1>&6
-echo "configure:10210: checking half-heartedly for 'dosynctodr' in the kernel" 1>&5
+echo "configure:10216: checking half-heartedly for 'dosynctodr' in the kernel" 1>&5
if test "${ac_cv_var_nlist_dosynctodr+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
#
echo $ac_n "checking half-heartedly for 'noprintf' in the kernel... $ac_c" 1>&6
-echo "configure:10262: checking half-heartedly for 'noprintf' in the kernel" 1>&5
+echo "configure:10268: checking half-heartedly for 'noprintf' in the kernel" 1>&5
if test "${ac_cv_var_nlist_noprintf+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for a default value for 'tick'... $ac_c" 1>&6
-echo "configure:10308: checking for a default value for 'tick'" 1>&5
+echo "configure:10314: checking for a default value for 'tick'" 1>&5
if test "${ac_cv_var_tick+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking for a default value for 'tickadj'... $ac_c" 1>&6
-echo "configure:10351: checking for a default value for 'tickadj'" 1>&5
+echo "configure:10357: checking for a default value for 'tickadj'" 1>&5
if test "${ac_cv_var_tickadj+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we want and can make the tickadj utility... $ac_c" 1>&6
-echo "configure:10482: checking if we want and can make the tickadj utility" 1>&5
+echo "configure:10488: checking if we want and can make the tickadj utility" 1>&5
if test "${ac_cv_make_tickadj+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we want and can make the ntptime utility... $ac_c" 1>&6
-echo "configure:10496: checking if we want and can make the ntptime utility" 1>&5
+echo "configure:10502: checking if we want and can make the ntptime utility" 1>&5
if test "${ac_cv_make_ntptime+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we want UDP wildcard delivery... $ac_c" 1>&6
-echo "configure:10521: checking if we want UDP wildcard delivery" 1>&5
+echo "configure:10527: checking if we want UDP wildcard delivery" 1>&5
if test "${ac_cv_var_udp_wildcard_delivery+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we should always slew the time... $ac_c" 1>&6
-echo "configure:10599: checking if we should always slew the time" 1>&5
+echo "configure:10605: checking if we should always slew the time" 1>&5
if test "${ac_cv_var_slew_always+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we should step and slew the time... $ac_c" 1>&6
-echo "configure:10638: checking if we should step and slew the time" 1>&5
+echo "configure:10644: checking if we should step and slew the time" 1>&5
if test "${ac_cv_var_step_slew+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if ntpdate should step the time... $ac_c" 1>&6
-echo "configure:10680: checking if ntpdate should step the time" 1>&5
+echo "configure:10686: checking if ntpdate should step the time" 1>&5
if test "${ac_cv_var_ntpdate_step+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we should sync TODR clock every hour... $ac_c" 1>&6
-echo "configure:10710: checking if we should sync TODR clock every hour" 1>&5
+echo "configure:10716: checking if we should sync TODR clock every hour" 1>&5
if test "${ac_cv_var_sync_todr+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
esac
echo $ac_n "checking if we should avoid kernel FLL bug... $ac_c" 1>&6
-echo "configure:10742: checking if we should avoid kernel FLL bug" 1>&5
+echo "configure:10748: checking if we should avoid kernel FLL bug" 1>&5
if test "${ac_cv_var_kernel_fll_bug+set}" = set; then
echo $ac_n "(cached) $ac_c" 1>&6
else
--- /dev/null
+/*
+ * Copyright (c) 1983, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * $FreeBSD: src/lib/libc/stdlib/random.c,v 1.4.2.2 1999/09/05 11:16:45 peter Exp $
+ *
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95";
+#endif /* LIBC_SCCS and not lint */
+
+#include "config.h"
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <stdio.h>
+
+#include <ntp_types.h>
+
+/*
+ * random.c:
+ *
+ * An improved random number generation package. In addition to the standard
+ * rand()/srand() like interface, this package also has a special state info
+ * interface. The initstate() routine is called with a seed, an array of
+ * bytes, and a count of how many bytes are being passed in; this array is
+ * then initialized to contain information for random number generation with
+ * that much state information. Good sizes for the amount of state
+ * information are 32, 64, 128, and 256 bytes. The state can be switched by
+ * calling the setstate() routine with the same array as was initiallized
+ * with initstate(). By default, the package runs with 128 bytes of state
+ * information and generates far better random numbers than a linear
+ * congruential generator. If the amount of state information is less than
+ * 32 bytes, a simple linear congruential R.N.G. is used.
+ *
+ * Internally, the state information is treated as an array of longs; the
+ * zeroeth element of the array is the type of R.N.G. being used (small
+ * integer); the remainder of the array is the state information for the
+ * R.N.G. Thus, 32 bytes of state information will give 7 longs worth of
+ * state information, which will allow a degree seven polynomial. (Note:
+ * the zeroeth word of state information also has some other information
+ * stored in it -- see setstate() for details).
+ *
+ * The random number generation technique is a linear feedback shift register
+ * approach, employing trinomials (since there are fewer terms to sum up that
+ * way). In this approach, the least significant bit of all the numbers in
+ * the state table will act as a linear feedback shift register, and will
+ * have period 2^deg - 1 (where deg is the degree of the polynomial being
+ * used, assuming that the polynomial is irreducible and primitive). The
+ * higher order bits will have longer periods, since their values are also
+ * influenced by pseudo-random carries out of the lower bits. The total
+ * period of the generator is approximately deg*(2**deg - 1); thus doubling
+ * the amount of state information has a vast influence on the period of the
+ * generator. Note: the deg*(2**deg - 1) is an approximation only good for
+ * large deg, when the period of the shift register is the dominant factor.
+ * With deg equal to seven, the period is actually much longer than the
+ * 7*(2**7 - 1) predicted by this formula.
+ *
+ * Modified 28 December 1994 by Jacob S. Rosenberg.
+ * The following changes have been made:
+ * All references to the type u_int have been changed to unsigned long.
+ * All references to type int have been changed to type long. Other
+ * cleanups have been made as well. A warning for both initstate and
+ * setstate has been inserted to the effect that on Sparc platforms
+ * the 'arg_state' variable must be forced to begin on word boundaries.
+ * This can be easily done by casting a long integer array to char *.
+ * The overall logic has been left STRICTLY alone. This software was
+ * tested on both a VAX and Sun SpacsStation with exactly the same
+ * results. The new version and the original give IDENTICAL results.
+ * The new version is somewhat faster than the original. As the
+ * documentation says: "By default, the package runs with 128 bytes of
+ * state information and generates far better random numbers than a linear
+ * congruential generator. If the amount of state information is less than
+ * 32 bytes, a simple linear congruential R.N.G. is used." For a buffer of
+ * 128 bytes, this new version runs about 19 percent faster and for a 16
+ * byte buffer it is about 5 percent faster.
+ */
+
+/*
+ * For each of the currently supported random number generators, we have a
+ * break value on the amount of state information (you need at least this
+ * many bytes of state info to support this random number generator), a degree
+ * for the polynomial (actually a trinomial) that the R.N.G. is based on, and
+ * the separation between the two lower order coefficients of the trinomial.
+ */
+#define TYPE_0 0 /* linear congruential */
+#define BREAK_0 8
+#define DEG_0 0
+#define SEP_0 0
+
+#define TYPE_1 1 /* x**7 + x**3 + 1 */
+#define BREAK_1 32
+#define DEG_1 7
+#define SEP_1 3
+
+#define TYPE_2 2 /* x**15 + x + 1 */
+#define BREAK_2 64
+#define DEG_2 15
+#define SEP_2 1
+
+#define TYPE_3 3 /* x**31 + x**3 + 1 */
+#define BREAK_3 128
+#define DEG_3 31
+#define SEP_3 3
+
+#define TYPE_4 4 /* x**63 + x + 1 */
+#define BREAK_4 256
+#define DEG_4 63
+#define SEP_4 1
+
+/*
+ * Array versions of the above information to make code run faster --
+ * relies on fact that TYPE_i == i.
+ */
+#define MAX_TYPES 5 /* max number of types above */
+
+static long degrees[MAX_TYPES] = { DEG_0, DEG_1, DEG_2, DEG_3, DEG_4 };
+static long seps [MAX_TYPES] = { SEP_0, SEP_1, SEP_2, SEP_3, SEP_4 };
+
+/*
+ * Initially, everything is set up as if from:
+ *
+ * initstate(1, randtbl, 128);
+ *
+ * Note that this initialization takes advantage of the fact that srandom()
+ * advances the front and rear pointers 10*rand_deg times, and hence the
+ * rear pointer which starts at 0 will also end up at zero; thus the zeroeth
+ * element of the state information, which contains info about the current
+ * position of the rear pointer is just
+ *
+ * MAX_TYPES * (rptr - state) + TYPE_3 == TYPE_3.
+ */
+
+static long randtbl[DEG_3 + 1] = {
+ TYPE_3,
+#ifdef USE_WEAK_SEEDING
+/* Historic implementation compatibility */
+/* The random sequences do not vary much with the seed */
+ 0x9a319039, 0x32d9c024, 0x9b663182, 0x5da1f342, 0xde3b81e0, 0xdf0a6fb5,
+ 0xf103bc02, 0x48f340fb, 0x7449e56b, 0xbeb1dbb0, 0xab5c5918, 0x946554fd,
+ 0x8c2e680f, 0xeb3d799f, 0xb11ee0b7, 0x2d436b86, 0xda672e2a, 0x1588ca88,
+ 0xe369735d, 0x904f35f7, 0xd7158fd6, 0x6fa6f051, 0x616e6b96, 0xac94efdc,
+ 0x36413f93, 0xc622c298, 0xf5a42ab8, 0x8a88d77b, 0xf5ad9d0e, 0x8999220b,
+ 0x27fb47b9,
+#else /* !USE_WEAK_SEEDING */
+ 0x991539b1, 0x16a5bce3, 0x6774a4cd, 0x3e01511e, 0x4e508aaa, 0x61048c05,
+ 0xf5500617, 0x846b7115, 0x6a19892c, 0x896a97af, 0xdb48f936, 0x14898454,
+ 0x37ffd106, 0xb58bff9c, 0x59e17104, 0xcf918a49, 0x09378c83, 0x52c7a471,
+ 0x8d293ea9, 0x1f4fc301, 0xc3db71be, 0x39b44e1c, 0xf8a44ef9, 0x4c8b80b1,
+ 0x19edc328, 0x87bf4bdd, 0xc9b240e5, 0xe9ee4b1b, 0x4382aee7, 0x535b6b41,
+ 0xf3bec5da
+#endif /* !USE_WEAK_SEEDING */
+};
+
+/*
+ * fptr and rptr are two pointers into the state info, a front and a rear
+ * pointer. These two pointers are always rand_sep places aparts, as they
+ * cycle cyclically through the state information. (Yes, this does mean we
+ * could get away with just one pointer, but the code for random() is more
+ * efficient this way). The pointers are left positioned as they would be
+ * from the call
+ *
+ * initstate(1, randtbl, 128);
+ *
+ * (The position of the rear pointer, rptr, is really 0 (as explained above
+ * in the initialization of randtbl) because the state table pointer is set
+ * to point to randtbl[1] (as explained below).
+ */
+static long *fptr = &randtbl[SEP_3 + 1];
+static long *rptr = &randtbl[1];
+
+/*
+ * The following things are the pointer to the state information table, the
+ * type of the current generator, the degree of the current polynomial being
+ * used, and the separation between the two pointers. Note that for efficiency
+ * of random(), we remember the first location of the state information, not
+ * the zeroeth. Hence it is valid to access state[-1], which is used to
+ * store the type of the R.N.G. Also, we remember the last location, since
+ * this is more efficient than indexing every time to find the address of
+ * the last element to see if the front and rear pointers have wrapped.
+ */
+static long *state = &randtbl[1];
+static long rand_type = TYPE_3;
+static long rand_deg = DEG_3;
+static long rand_sep = SEP_3;
+static long *end_ptr = &randtbl[DEG_3 + 1];
+
+static inline long good_rand P((long));
+long random P((void));
+
+static inline long
+good_rand (
+ register long x
+ )
+{
+#ifdef USE_WEAK_SEEDING
+/*
+ * Historic implementation compatibility.
+ * The random sequences do not vary much with the seed,
+ * even with overflowing.
+ */
+ return (1103515245 * x + 12345);
+#else /* !USE_WEAK_SEEDING */
+/*
+ * Compute x = (7^5 * x) mod (2^31 - 1)
+ * wihout overflowing 31 bits:
+ * (2^31 - 1) = 127773 * (7^5) + 2836
+ * From "Random number generators: good ones are hard to find",
+ * Park and Miller, Communications of the ACM, vol. 31, no. 10,
+ * October 1988, p. 1195.
+ */
+ register long hi, lo;
+
+ hi = x / 127773;
+ lo = x % 127773;
+ x = 16807 * lo - 2836 * hi;
+ if (x <= 0)
+ x += 0x7fffffff;
+ return (x);
+#endif /* !USE_WEAK_SEEDING */
+}
+
+/*
+ * srandom:
+ *
+ * Initialize the random number generator based on the given seed. If the
+ * type is the trivial no-state-information type, just remember the seed.
+ * Otherwise, initializes state[] based on the given "seed" via a linear
+ * congruential generator. Then, the pointers are set to known locations
+ * that are exactly rand_sep places apart. Lastly, it cycles the state
+ * information a given number of times to get rid of any initial dependencies
+ * introduced by the L.C.R.N.G. Note that the initialization of randtbl[]
+ * for default usage relies on values produced by this routine.
+ */
+void
+srandom(
+ unsigned long x
+ )
+{
+ register long i;
+
+ if (rand_type == TYPE_0)
+ state[0] = x;
+ else {
+ state[0] = x;
+ for (i = 1; i < rand_deg; i++)
+ state[i] = good_rand(state[i - 1]);
+ fptr = &state[rand_sep];
+ rptr = &state[0];
+ for (i = 0; i < 10 * rand_deg; i++)
+ (void)random();
+ }
+}
+
+/*
+ * srandomdev:
+ *
+ * Many programs choose the seed value in a totally predictable manner.
+ * This often causes problems. We seed the generator using the much more
+ * secure urandom(4) interface. Note that this particular seeding
+ * procedure can generate states which are impossible to reproduce by
+ * calling srandom() with any value, since the succeeding terms in the
+ * state buffer are no longer derived from the LC algorithm applied to
+ * a fixed seed.
+ */
+void
+srandomdev( void )
+{
+ struct timeval tv;
+ unsigned long junk; /* Purposely used uninitialized */
+
+ gettimeofday(&tv, NULL);
+ srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec ^ junk);
+ return;
+}
+
+/*
+ * initstate:
+ *
+ * Initialize the state information in the given array of n bytes for future
+ * random number generation. Based on the number of bytes we are given, and
+ * the break values for the different R.N.G.'s, we choose the best (largest)
+ * one we can and set things up for it. srandom() is then called to
+ * initialize the state information.
+ *
+ * Note that on return from srandom(), we set state[-1] to be the type
+ * multiplexed with the current value of the rear pointer; this is so
+ * successive calls to initstate() won't lose this information and will be
+ * able to restart with setstate().
+ *
+ * Note: the first thing we do is save the current state, if any, just like
+ * setstate() so that it doesn't matter when initstate is called.
+ *
+ * Returns a pointer to the old state.
+ *
+ * Note: The Sparc platform requires that arg_state begin on a long
+ * word boundary; otherwise a bus error will occur. Even so, lint will
+ * complain about mis-alignment, but you should disregard these messages.
+ */
+char *
+initstate(
+ unsigned long seed, /* seed for R.N.G. */
+ char *arg_state, /* pointer to state array */
+ long n /* # bytes of state info */
+ )
+{
+ register char *ostate = (char *)(&state[-1]);
+ register long *long_arg_state = (long *) arg_state;
+
+ if (rand_type == TYPE_0)
+ state[-1] = rand_type;
+ else
+ state[-1] = MAX_TYPES * (rptr - state) + rand_type;
+ if (n < BREAK_0) {
+ (void)fprintf(stderr,
+ "random: not enough state (%ld bytes); ignored.\n", n);
+ return(0);
+ }
+ if (n < BREAK_1) {
+ rand_type = TYPE_0;
+ rand_deg = DEG_0;
+ rand_sep = SEP_0;
+ } else if (n < BREAK_2) {
+ rand_type = TYPE_1;
+ rand_deg = DEG_1;
+ rand_sep = SEP_1;
+ } else if (n < BREAK_3) {
+ rand_type = TYPE_2;
+ rand_deg = DEG_2;
+ rand_sep = SEP_2;
+ } else if (n < BREAK_4) {
+ rand_type = TYPE_3;
+ rand_deg = DEG_3;
+ rand_sep = SEP_3;
+ } else {
+ rand_type = TYPE_4;
+ rand_deg = DEG_4;
+ rand_sep = SEP_4;
+ }
+ state = (long *) (long_arg_state + 1); /* first location */
+ end_ptr = &state[rand_deg]; /* must set end_ptr before srandom */
+ srandom(seed);
+ if (rand_type == TYPE_0)
+ long_arg_state[0] = rand_type;
+ else
+ long_arg_state[0] = MAX_TYPES * (rptr - state) + rand_type;
+ return(ostate);
+}
+
+/*
+ * setstate:
+ *
+ * Restore the state from the given state array.
+ *
+ * Note: it is important that we also remember the locations of the pointers
+ * in the current state information, and restore the locations of the pointers
+ * from the old state information. This is done by multiplexing the pointer
+ * location into the zeroeth word of the state information.
+ *
+ * Note that due to the order in which things are done, it is OK to call
+ * setstate() with the same state as the current state.
+ *
+ * Returns a pointer to the old state information.
+ *
+ * Note: The Sparc platform requires that arg_state begin on a long
+ * word boundary; otherwise a bus error will occur. Even so, lint will
+ * complain about mis-alignment, but you should disregard these messages.
+ */
+char *
+setstate(
+ char *arg_state /* pointer to state array */
+ )
+{
+ register long *new_state = (long *) arg_state;
+ register long type = new_state[0] % MAX_TYPES;
+ register long rear = new_state[0] / MAX_TYPES;
+ char *ostate = (char *)(&state[-1]);
+
+ if (rand_type == TYPE_0)
+ state[-1] = rand_type;
+ else
+ state[-1] = MAX_TYPES * (rptr - state) + rand_type;
+ switch(type) {
+ case TYPE_0:
+ case TYPE_1:
+ case TYPE_2:
+ case TYPE_3:
+ case TYPE_4:
+ rand_type = type;
+ rand_deg = degrees[type];
+ rand_sep = seps[type];
+ break;
+ default:
+ (void)fprintf(stderr,
+ "random: state info corrupted; not changed.\n");
+ }
+ state = (long *) (new_state + 1);
+ if (rand_type != TYPE_0) {
+ rptr = &state[rear];
+ fptr = &state[(rear + rand_sep) % rand_deg];
+ }
+ end_ptr = &state[rand_deg]; /* set end_ptr too */
+ return(ostate);
+}
+
+/*
+ * random:
+ *
+ * If we are using the trivial TYPE_0 R.N.G., just do the old linear
+ * congruential bit. Otherwise, we do our fancy trinomial stuff, which is
+ * the same in all the other cases due to all the global variables that have
+ * been set up. The basic operation is to add the number at the rear pointer
+ * into the one at the front pointer. Then both pointers are advanced to
+ * the next location cyclically in the table. The value returned is the sum
+ * generated, reduced to 31 bits by throwing away the "least random" low bit.
+ *
+ * Note: the code takes advantage of the fact that both the front and
+ * rear pointers can't wrap on the same call by not testing the rear
+ * pointer if the front one has wrapped.
+ *
+ * Returns a 31-bit random number.
+ */
+long
+random( void )
+{
+ register long i;
+ register long *f, *r;
+
+ if (rand_type == TYPE_0) {
+ i = state[0];
+ state[0] = i = (good_rand(i)) & 0x7fffffff;
+ } else {
+ /*
+ * Use local variables rather than static variables for speed.
+ */
+ f = fptr; r = rptr;
+ *f += *r;
+ i = (*f >> 1) & 0x7fffffff; /* chucking least random bit */
+ if (++f >= end_ptr) {
+ f = state;
+ ++r;
+ }
+ else if (++r >= end_ptr) {
+ r = state;
+ }
+
+ fptr = f; rptr = r;
+ }
+ return(i);
+}