diff --git a/config.h.in b/config.h.in index 08c50a79a9..8099f2f678 100644 --- a/config.h.in +++ b/config.h.in @@ -16,7 +16,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: config.h.in,v 1.52 2002/10/15 04:35:09 marka Exp $ */ +/* $Id: config.h.in,v 1.53 2002/12/04 01:34:41 marka Exp $ */ /*** *** This file is not to be included by any public header files, because @@ -76,6 +76,9 @@ /* define if gai_strerror() exists */ #undef HAVE_GAISTRERROR +/* define if arc4random() exists */ +#undef HAVE_ARC4RANDOM + /* define if pthread_setconcurrency() should be called to tell the * OS how many threads we might want to run. */ diff --git a/configure b/configure index 9467473a0c..9c17471671 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.333 . +# From configure.in Revision: 1.334 . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.53. # @@ -4657,6 +4657,81 @@ echo "${ECHO_T}using \"$use_randomdev\"" >&6 ;; esac +# +# Do we have arc4random() ? +# +echo "$as_me:$LINENO: checking for arc4random" >&5 +echo $ECHO_N "checking for arc4random... $ECHO_C" >&6 +if test "${ac_cv_func_arc4random+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +#include "confdefs.h" +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char arc4random (); below. */ +#include +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char arc4random (); +char (*f) (); + +#ifdef F77_DUMMY_MAIN +# ifdef __cplusplus + extern "C" +# endif + int F77_DUMMY_MAIN() { return 1; } +#endif +int +main () +{ +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_arc4random) || defined (__stub___arc4random) +choke me +#else +f = arc4random; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -s conftest$ac_exeext' + { (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_func_arc4random=yes +else + echo "$as_me: failed program was:" >&5 +cat conftest.$ac_ext >&5 +ac_cv_func_arc4random=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_arc4random" >&5 +echo "${ECHO_T}$ac_cv_func_arc4random" >&6 +if test $ac_cv_func_arc4random = yes; then + cat >>confdefs.h <<\_ACEOF +#define HAVE_ARC4RANDOM 1 +_ACEOF + +fi + + # # Begin pthreads checking. # @@ -7357,7 +7432,7 @@ test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 7360 "configure"' > conftest.$ac_ext + echo '#line 7435 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7907,7 +7982,7 @@ chmod -w . save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -o out/conftest2.$ac_objext" compiler_c_o=no -if { (eval echo configure:7910: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then +if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s out/conftest.err; then @@ -9738,7 +9813,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <