summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-11-23 19:32:39 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-11-23 19:32:39 +0000
commit06dcef110dc99a939ff2cfbc68ba85b4635cb055 (patch)
tree3fd56ae351d81d297672fb7412eb6436c7dbc184
parent53c306241b93562b3b309072a652c708e87c0850 (diff)
Set HAS_ARC4_RANDOM if arc4random() function is found Set RANDOMMANDEFS to
correctly substitute alternate random device/method descriptions in man page.
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac12
3 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 43d3175..1f8447d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-11-23 Alan Coopersmith <alan.coopersmith@sun.com>
+
+ * configure.ac:
+ * Makefile.am:
+ Set HAS_ARC4_RANDOM if arc4random() function is found
+ Set RANDOMMANDEFS to correctly substitute alternate random
+ device/method descriptions in man page.
+
2005-11-21 Alan Coopersmith <alan.coopersmith@sun.com>
* Makefile.am (MANDEFS):
diff --git a/Makefile.am b/Makefile.am
index 612ac95..52f7eb3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,7 @@ MANDEFS = \
-D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \
-D__adminmansuffix__=$(ADMIN_MAN_SUFFIX)
-CPP_FILES_FLAGS = $(MANDEFS) $(EXTRAMANDEFS)
+CPP_FILES_FLAGS = $(MANDEFS) $(RANDOMMANDEFS) $(EXTRAMANDEFS)
SUFFIXES += .$(APP_MAN_SUFFIX) .man.cpp
diff --git a/configure.ac b/configure.ac
index 9a3bd23..96baad3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -145,13 +145,23 @@ fi
if test x$RANDOM_DEVICE != xno ; then
AC_DEFINE_UNQUOTED(DEV_RANDOM,"$RANDOM_DEVICE",
[Define to device that provides random data source])
+ RANDOMMANDEFS="$RANDOMMANDEFS -DDEV_RANDOM=\\\"$RANDOM_DEVICE\\\""
fi
+AC_CHECK_FUNC(arc4random, [HAS_ARC4_RANDOM="yes"], [HAS_ARC4_RANDOM="no"])
+AM_CONDITIONAL(HAS_ARC4_RANDOM, test x$HAS_ARC4_RANDOM = xyes)
+if test x$HAS_ARC4_RANDOM = xyes ; then
+ AC_DEFINE(ARC4_RANDOM, 1, [Define to use arc4random() function])
+ RANDOMMANDEFS="$RANDOMMANDEFS -DARC4_RANDOM"
+fi
+
+AC_SUBST(RANDOMMANDEFS)
+
# FIXME: find out how to check for these things. Note that Kerberos was
# turned off everywhere but on OpenBSD.
AM_CONDITIONAL(HAS_KERBEROS_FIVE, false)
-AM_CONDITIONAL(HAS_ARC4_RANDOM, false)
+
# Figure out where everything goes in the filesystem