Hoello On Wed, May 25, 2005 at 05:55:11PM -0400, Nicolas Blais wrote: > I do this by changing my software's code to the following: > > #ifdef HAVE_SRANDOMDEV > srandomdev(); > #endif > #ifndef HAVE_SRANDOMDEV > srandom(time(0)); > #endif Or perhaps: #ifdef HAVE_SRANDOMDEV srandomdev(); #else srandom(time(0)); #endif I think this is not bad solution. If you call this several times, you can also do #ifdef HAVE_SRANDOMDEV # define SRANDOMDEV(x) srandomdev() #else # define SRANDOMDEV(x) srandom(time(0)) #endif and then call SRANDOMDEV(); in your code. > I'm hoping there is a better way to do this by using AC_REPLACE_FUNCS, The project gnulib on savannah (list bug-gnulib@xxxxxxx) is trying to solve this type of problems. But I'm not sure whether it's not an overkill to use its infrastructure just for this single small problem. Gnulib has replacements for many functions, but I think srandomdev is not there (yet). Have a nice day, Stepan Kasal _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf