Imported Upstream version 0.63.0
[hcoop/debian/courier-authlib.git] / random128 / configure.in
CommitLineData
d9898ee8 1dnl Process this file with autoconf to produce a configure script.
8d138742 2dnl $Id: configure.in,v 1.14 2008/11/27 20:33:44 mrsam Exp $
d9898ee8 3dnl
4dnl Copyright 1998 - 2002 Double Precision, Inc. See COPYING for
5dnl distribution information.
6
7AC_INIT(random128, 0.10, [courier-users@lists.sourceforge.net])
8
9>confdefs.h # Kill PACKAGE_ macros
10
11AC_CONFIG_SRCDIR(random128.c)
12AM_INIT_AUTOMAKE([foreign no-define])
13LPATH="$PATH:/usr/local/bin"
14
15
16dnl Checks for programs.
17AM_CONFIG_HEADER(config.h)
8d138742 18AC_USE_SYSTEM_EXTENSIONS
d9898ee8 19AC_PROG_INSTALL
20AC_PROG_LN_S
21AC_PROG_CC
22AC_PATH_PROGS(PS, ps, ps, $LPATH)
23AC_PATH_PROGS(W, w, w, $LPATH)
24AC_PROG_LIBTOOL
25
26if test "$PS" = "ps"
27then
28 AC_MSG_ERROR(Cannot find pathname to ps)
29fi
30
31if test x$GXX = xyes
32then
33 CFLAGS="-Wall $CFLAGS"
34fi
35
36CFLAGS="-I.. -I$srcdir/.. $CFLAGS"
37
38dnl Checks for libraries.
39
40dnl Checks for header files.
41AC_HEADER_SYS_WAIT
42AC_CHECK_HEADERS(unistd.h fcntl.h)
43
44AC_TYPE_PID_T
45
46AC_ARG_WITH(random, [ --with-random=/dev/urandom - location of the system random file generator
47--without-random - there is no system random file generator ],
48 random="$withval",
49 random="y")
50
51case "$random" in
52/*)
53 ;;
54y*|1*)
55 AC_CACHE_CHECK([for random source],random_cv_RANDOM,
56
57 if test -c /dev/urandom
58 then
59 random_cv_RANDOM=/dev/urandom
60 else
61 if test -c /dev/random
62 then
63 random_cv_RANDOM=/dev/random
64 else
65 random_cv_RANDOM="none"
66 fi
67 fi
68 )
69 random="$random_cv_RANDOM"
70 ;;
71*)
72 random="none"
73 ;;
74esac
75
76if test "$random" != "none"
77then
78 AC_DEFINE_UNQUOTED(RANDOM, "$random", [ Entropy source ])
79fi
80
81AC_CACHE_CHECK([for some good options for ps],random_cv_PS_OPTIONS,
82
83 for opts in -Afl -Afw -Af -Al -afl -afw -af -al Afl Afw Af Al afl afw af al
84 do
85 ps $opts >/dev/null 2>/dev/null || continue
86 break
87 done
88 random_cv_PS_OPTIONS="$opts"
89)
90
91AC_DEFINE_UNQUOTED(PS_OPTIONS,"$random_cv_PS_OPTIONS",
92 [ How to make ps(1) spit out lots of crap ])
93AC_DEFINE_UNQUOTED(PS,"$PS", [ The PS program ])
94
95if test "$W" != "w"
96then
97 AC_DEFINE_UNQUOTED(W, "$w", [ The W program ])
98fi
99
100AC_OUTPUT(Makefile)