chiark / gitweb /
Major overhaul. Now uses DSA signatures rather than the bogus symmetric
[become] / configure.in
CommitLineData
c4f2d992 1dnl -*-fundamental-*-
2dnl
f60a3434 3dnl $Id: configure.in,v 1.19 2003/10/12 00:14:44 mdw Exp $
c4f2d992 4dnl
5dnl Source for auto configuration for `become'
6dnl
c758e654 7dnl (c) 1998 Mark Wooding
c4f2d992 8dnl
9
03f996bd 10dnl----- Licensing notice ---------------------------------------------------
c4f2d992 11dnl
12dnl This file is part of `become'
13dnl
14dnl `Become' is free software; you can redistribute it and/or modify
15dnl it under the terms of the GNU General Public License as published by
16dnl the Free Software Foundation; either version 2 of the License, or
17dnl (at your option) any later version.
18dnl
19dnl `Become' is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22dnl GNU General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU General Public License
03f996bd 25dnl along with `become'; if not, write to the Free Software Foundation,
26dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
c4f2d992 27
28dnl----- Revision history ---------------------------------------------------
29dnl
30dnl $Log: configure.in,v $
f60a3434 31dnl Revision 1.19 2003/10/12 00:14:44 mdw
32dnl Major overhaul. Now uses DSA signatures rather than the bogus symmetric
33dnl encrypt-and-hope thing. Integrated with mLib and Catacomb.
34dnl
98661ef5 35dnl Revision 1.18 1999/07/28 09:30:12 mdw
36dnl Use new-fangled mdw_TYPE_SSIZE_T macro.
37dnl
b6ea915c 38dnl Revision 1.17 1999/05/04 16:25:19 mdw
39dnl Fixes for new version of automake.
40dnl
41dnl Revision 1.16 1998/06/18 15:15:45 mdw
b24e27ea 42dnl Set version number properly. D'oh.
43dnl
82399d0a 44dnl Revision 1.15 1998/06/18 15:11:36 mdw
45dnl Change patchlevel. Check for @sigprocmask@, for improved @noise__shell@
46dnl function.
47dnl
b1b19a1e 48dnl Revision 1.14 1998/06/08 11:22:16 mdw
49dnl Step version number and date.
50dnl
b0ac4e9d 51dnl Revision 1.13 1998/04/23 13:34:10 mdw
52dnl Release version.
53dnl
45732897 54dnl Revision 1.12 1998/04/23 13:09:24 mdw
55dnl Add new option to disable networking.
56dnl
07981d85 57dnl Revision 1.11 1998/02/20 17:55:56 mdw
58dnl Fix default HTML directory.
59dnl
c758e654 60dnl Revision 1.10 1998/01/12 16:45:21 mdw
61dnl Fix copyright date.
62dnl
63dnl Revision 1.9 1997/09/18 11:24:27 mdw
df962e20 64dnl Add `conf' directory. Add an `htmldir' installation directory too.
65dnl
66dnl Revision 1.8 1997/09/17 10:36:30 mdw
f36dccc8 67dnl Remove `set.c'. No longer necessary.
68dnl
ffbfa517 69dnl Revision 1.7 1997/09/09 18:18:41 mdw
70dnl Check for setgroups(2), to see whether subsidiary group lists need to be
71dnl fiddled with.
f81d049a 72dnl
f36dccc8 73dnl Revision 1.6 1997/09/08 13:41:14 mdw
74dnl Check for `setreuid' for changing permissions.
75dnl
76dnl Revision 1.5 1997/09/05 11:45:18 mdw
77dnl Add support for different login styles, and environment variable
78dnl manipulation in a safe and useful way.
79dnl
80dnl Revision 1.4 1997/08/20 16:10:56 mdw
81dnl Lowercase `mdw_' prefixes to macros. Add a `--with-etcdir=PATH'
82dnl option. Update `stamp-h' as required by the Automake docs (silly
83dnl me).
84dnl
1bda7a39 85dnl Revision 1.3 1997/08/07 09:34:32 mdw
f81d049a 86dnl Added `ElectricFence' support, and support for the `deep' package
87dnl structure.
1bda7a39 88dnl
03f996bd 89dnl Revision 1.2 1997/08/04 10:24:21 mdw
90dnl Sources placed under CVS control.
c4f2d992 91dnl
1bda7a39 92dnl Revision 1.1 1997/07/21 13:47:51 mdw
93dnl Initial revision
94dnl
c4f2d992 95
f60a3434 96AC_INIT(src/become.c)
97AM_INIT_AUTOMAKE(become, 1.4.0)
b6ea915c 98AM_CONFIG_HEADER(config.h)
c4f2d992 99
100dnl --- Check for compilers and things ---
101
102AC_PROG_CC
b6ea915c 103mdw_GCC_FLAGS
104AM_PROG_LEX
c4f2d992 105AC_CHECK_PROG(AR, ar, ar)
106AC_PROG_RANLIB
107AC_PROG_YACC
c4f2d992 108
387501ae 109dnl --- Set default become style ---
110
111AC_ARG_ENABLE([style],
ffbfa517 112[ --enable-style=STYLE set default style to preserve, setuser, or login],
f36dccc8 113[case "$enableval" in
387501ae 114 preserve) style="l_preserve" ;;
ffbfa517 115 su|setuser) style="l_setuser" ;;
387501ae 116 login) style="l_login" ;;
f36dccc8 117 *) AC_MSG_ERROR([unknown login style: choose preserve, setuser, or login])
118 ;;
387501ae 119esac],
120[style="l_preserve"])
121AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
122
45732897 123dnl --- Choose networking options ---
124
125AC_ARG_ENABLE([network],
126[ --disable-network disable the client-server bits of the program],
127 [if test "$enableval" = "no"; then
128 AC_DEFINE(NONETWORK)
129 fi])
130
f81d049a 131dnl --- Set configuration directory ---
132
133AC_ARG_WITH([etcdir],
134[ --with-etcdir=PATH set directory for configuration and key files
135 [default is /etc/become]],
136[etcdir="$withval"], [etcdir="/etc/become"])
137AC_SUBST(etcdir)
138AC_DEFINE_UNQUOTED(ETCDIR, "$etcdir")
139
df962e20 140AC_ARG_WITH([htmldir],
141[ --with-htmldir=PATH set directory for HTML documentation
142 [default is PREFIX/html/become]],
07981d85 143[htmldir="$withval"], [htmldir='${prefix}/html/become'])
df962e20 144AC_SUBST(htmldir)
145
c4f2d992 146dnl --- Debugging stuff ---
147
f60a3434 148mdw_OPT_EFENCE
149mdw_OPT_NDEBUG
150mdw_OPT_TRACE
c4f2d992 151
f36dccc8 152dnl --- Libraries ---
153
f60a3434 154mdw_MLIB(2.0.1)
155mdw_CATACOMB(2.0.1)
156
f36dccc8 157mdw_CHECK_MANYLIBS(socket, socket,,
c758e654 158 [AC_MSG_ERROR([Socket library not found])])
f36dccc8 159
160mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
c758e654 161 [AC_MSG_ERROR([Resolver library not found])])
f36dccc8 162
163mdw_CHECK_MANYLIBS(yp_all, nsl, AC_DEFINE(HAVE_YP))
164
82399d0a 165dnl --- Other functions ---
166
167AC_CHECK_FUNCS(sigprocmask)
168
f36dccc8 169dnl --- Types ---
170
171AC_TYPE_PID_T
172AC_TYPE_UID_T
98661ef5 173mdw_TYPE_SSIZE_T
f36dccc8 174
f36dccc8 175dnl --- Set the path separator ---
176
177AC_DEFINE(PATHSEP, '/')
178
179dnl --- Check for some useful functions ---
180
181AC_CHECK_FUNCS(setreuid setgroups)
182AC_CHECK_FUNCS(getrusage vtimes)
183
c4f2d992 184dnl --- Done ---
185
b6ea915c 186AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile)
c4f2d992 187
188dnl----- That's all, folks --------------------------------------------------