File: configure.in

package info (click to toggle)
courier 0.60.0-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 52,288 kB
  • ctags: 12,677
  • sloc: ansic: 165,348; cpp: 24,820; sh: 16,410; perl: 6,839; makefile: 3,621; yacc: 289; sed: 16
file content (102 lines) | stat: -rw-r--r-- 2,050 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
dnl Process this file with autoconf to produce a configure script.
dnl $Id: configure.in,v 1.13 2007/02/26 04:13:41 mrsam Exp $
dnl
dnl Copyright 1998 - 2002 Double Precision, Inc.  See COPYING for
dnl distribution information.

AC_INIT(random128, 0.10, [courier-users@lists.sourceforge.net])

>confdefs.h  # Kill PACKAGE_ macros

AC_CONFIG_SRCDIR(random128.c)
AM_INIT_AUTOMAKE([foreign no-define])
LPATH="$PATH:/usr/local/bin"


dnl Checks for programs.
AM_CONFIG_HEADER(config.h)
AC_AIX
AC_ISC_POSIX
AC_MINIX
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_CC
AC_PATH_PROGS(PS, ps, ps, $LPATH)
AC_PATH_PROGS(W, w, w, $LPATH)
AC_PROG_LIBTOOL

if test "$PS" = "ps"
then
	AC_MSG_ERROR(Cannot find pathname to ps)
fi

if test x$GXX = xyes
then
	CFLAGS="-Wall $CFLAGS"
fi

CFLAGS="-I.. -I$srcdir/.. $CFLAGS"

dnl Checks for libraries.

dnl Checks for header files.
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS(unistd.h fcntl.h)

AC_TYPE_PID_T

AC_ARG_WITH(random, [ --with-random=/dev/urandom - location of the system random file generator
--without-random            - there is no system random file generator ],
	random="$withval",
	random="y")

case "$random" in
/*)
	;;
y*|1*)
	AC_CACHE_CHECK([for random source],random_cv_RANDOM,

		if test -c /dev/urandom
		then
			random_cv_RANDOM=/dev/urandom
		else
			if test -c /dev/random
			then
				random_cv_RANDOM=/dev/random
			else
				random_cv_RANDOM="none"
			fi
		fi
	)
	random="$random_cv_RANDOM"
	;;
*)
	random="none"
	;;
esac

if test "$random" != "none"
then
	AC_DEFINE_UNQUOTED(RANDOM, "$random", [ Entropy source ])
fi

AC_CACHE_CHECK([for some good options for ps],random_cv_PS_OPTIONS,

	for opts in -Afl -Afw -Af -Al -afl -afw -af -al Afl Afw Af Al afl afw af al
	do
		ps $opts >/dev/null 2>/dev/null || continue
		break
	done
	random_cv_PS_OPTIONS="$opts"
)

AC_DEFINE_UNQUOTED(PS_OPTIONS,"$random_cv_PS_OPTIONS",
	[ How to make ps(1) spit out lots of crap ])
AC_DEFINE_UNQUOTED(PS,"$PS", [ The PS program ])

if test "$W" != "w"
then
	AC_DEFINE_UNQUOTED(W, "$w", [ The W program ])
fi

AC_OUTPUT(Makefile)