]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
regen
authorFrancis Dupont <fdupont@isc.org>
Fri, 29 Jan 2016 14:00:37 +0000 (15:00 +0100)
committerFrancis Dupont <fdupont@isc.org>
Fri, 29 Jan 2016 14:00:37 +0000 (15:00 +0100)
configure
includes/config.h.in

index 11c13a4bfe219c4142837c97d7351e6c42407a8d..7efe476bf91a9020e55d906cbd23bf918a3ab3c0 100755 (executable)
--- a/configure
+++ b/configure
@@ -769,6 +769,7 @@ with_cli_pid_file
 with_cli6_pid_file
 with_relay_pid_file
 with_relay6_pid_file
+with_randomdev
 with_libbind
 with_ldap
 with_ldapcrypto
@@ -1466,6 +1467,7 @@ Optional Packages:
   --with-relay6-pid-file=PATH
                           File for dhcrelay6 process information (default is
                           LOCALSTATEDIR/run/dhcrelay6.pid)
+  --with-randomdev=PATH   Path for random device (default is /dev/random)
   --with-libbind=PATH     bind includes and libraries are in PATH (default is
                           ./bind)
   --with-ldap             enable OpenLDAP support in dhcpd (default is no)
@@ -6630,27 +6632,65 @@ fi
 
 
 # check for /dev/random (declares HAVE_DEV_RANDOM)
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/random" >&5
-$as_echo_n "checking for /dev/random... " >&6; }
-if ${ac_cv_file__dev_random+:} false; then :
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for random device" >&5
+$as_echo_n "checking for random device... " >&6; }
+
+# Check whether --with-randomdev was given.
+if test "${with_randomdev+set}" = set; then :
+  withval=$with_randomdev; use_randomdev="$withval"
+else
+  use_randomdev="unspec"
+fi
+
+if test "$use_randomdev" = "unspec"; then
+       if test "$cross_compiling" = "yes"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: unspecified" >&5
+$as_echo "unspecified" >&6; }
+               as_fn_error $? " need --with-randomdev=PATH or --with-randomdev=no" "$LINENO" 5
+       fi
+       use_randomdev="/dev/random"
+elif test "$use_randomdev" = "yes"; then
+       use_randomdev="/dev/random"
+fi
+if test "$use_randomdev" = "no"; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
+$as_echo "disabled" >&6; }
+       BINDCONFIG="$BINDCONFIG --with-randomdev=no"
+else
+       if test "$cross_compiling" = "yes"; then
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_randomdev (unchecked)" >&5
+$as_echo "$use_randomdev (unchecked)" >&6; }
+       else
+               { $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_randomdev" >&5
+$as_echo "$use_randomdev" >&6; }
+               as_ac_File=`$as_echo "ac_cv_file_$use_randomdev" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $use_randomdev" >&5
+$as_echo_n "checking for $use_randomdev... " >&6; }
+if eval \${$as_ac_File+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   test "$cross_compiling" = yes &&
   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
-if test -r "/dev/random"; then
-  ac_cv_file__dev_random=yes
+if test -r "$use_randomdev"; then
+  eval "$as_ac_File=yes"
 else
-  ac_cv_file__dev_random=no
+  eval "$as_ac_File=no"
 fi
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_random" >&5
-$as_echo "$ac_cv_file__dev_random" >&6; }
-if test "x$ac_cv_file__dev_random" = xyes; then :
+eval ac_res=\$$as_ac_File
+              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
 
 $as_echo "#define HAVE_DEV_RANDOM 1" >>confdefs.h
 
+else
+  as_fn_error $? "cannot find $use_randomdev" "$LINENO" 5
 fi
 
+       fi
+       BINDCONFIG="$BINDCONFIG --with-randomdev=$use_randomdev"
+fi
 
 # see if there is a "sa_len" field in our interface information structure
 ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include <sys/socket.h>
index 1730b8ecceb9b3ea16af0db3edfbde980e0ce3b9..80f3b083be8571a551df1d71a86414768a1f673f 100644 (file)
@@ -43,7 +43,7 @@
 /* Define to 1 to use the Berkeley Packet Filter interface code. */
 #undef HAVE_BPF
 
-/* Define to 1 if you have the /dev/random file. */
+/* Define to 1 if you have the /dev/random or other configured file. */
 #undef HAVE_DEV_RANDOM
 
 /* Define to 1 to use DLPI interface code. */