1 dnl Process this file with autoconf to produce a configure script.
2 dnl $Id: configure.in,v 1.13 2007/02/26 04:13:41 mrsam Exp $
4 dnl Copyright 1998 - 2002 Double Precision, Inc. See COPYING for
5 dnl distribution information.
7 AC_INIT(random128, 0.10, [courier-users@lists.sourceforge.net])
9 >confdefs.h # Kill PACKAGE_ macros
11 AC_CONFIG_SRCDIR(random128.c)
12 AM_INIT_AUTOMAKE([foreign no-define])
13 LPATH="$PATH:/usr/local/bin"
16 dnl Checks for programs.
17 AM_CONFIG_HEADER(config.h)
24 AC_PATH_PROGS(PS, ps, ps, $LPATH)
25 AC_PATH_PROGS(W, w, w, $LPATH)
30 AC_MSG_ERROR(Cannot find pathname to ps)
35 CFLAGS="-Wall $CFLAGS"
38 CFLAGS="-I.. -I$srcdir/.. $CFLAGS"
40 dnl Checks for libraries.
42 dnl Checks for header files.
44 AC_CHECK_HEADERS(unistd.h fcntl.h)
48 AC_ARG_WITH(random, [ --with-random=/dev/urandom - location of the system random file generator
49 --without-random - there is no system random file generator ],
57 AC_CACHE_CHECK([for random source],random_cv_RANDOM,
59 if test -c /dev/urandom
61 random_cv_RANDOM=/dev/urandom
63 if test -c /dev/random
65 random_cv_RANDOM=/dev/random
67 random_cv_RANDOM="none"
71 random="$random_cv_RANDOM"
78 if test "$random" != "none"
80 AC_DEFINE_UNQUOTED(RANDOM, "$random", [ Entropy source ])
83 AC_CACHE_CHECK([for some good options for ps],random_cv_PS_OPTIONS,
85 for opts in -Afl -Afw -Af -Al -afl -afw -af -al Afl Afw Af Al afl afw af al
87 ps $opts >/dev/null 2>/dev/null || continue
90 random_cv_PS_OPTIONS="$opts"
93 AC_DEFINE_UNQUOTED(PS_OPTIONS,"$random_cv_PS_OPTIONS",
94 [ How to make ps(1) spit out lots of crap ])
95 AC_DEFINE_UNQUOTED(PS,"$PS", [ The PS program ])
99 AC_DEFINE_UNQUOTED(W, "$w", [ The W program ])