Hi, I'm currently developping a C++ software on FreeBSD. Since that software uses stdlib.h's srandomdev() function, I added : AC_CHECK_FUNCS([srandomdev]) in my configure.in file to detect it. The problem is that on other oses such as Debian, there is no srandomdev() function in stdlib.h so I must use srandom() which is close enough. I do this by changing my software's code to the following: #ifdef HAVE_SRANDOMDEV srandomdev(); #endif #ifndef HAVE_SRANDOMDEV srandom(time(0)); #endif I'm hoping there is a better way to do this by using AC_REPLACE_FUNCS, but I can't seem to have it working. I'm trying to replace srandomdev() by srandom() from the same stdlib.h but it doesn't seem to work. Could someone be kind enough to post an example? Thanks, Nicolas -- FreeBSD 6.0-CURRENT #2: Sun May 22 11:29:47 EDT 2005 nicblais@clk01a:/usr/obj/usr/src/sys/CLK01A PGP? : http://66.130.198.54:8081/security/nb_root.asc
Attachment:
pgpOh5eHQzltv.pgp
Description: PGP signature
_______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf