Fix copyright date.
[become] / configure.in
... / ...
CommitLineData
1dnl -*-fundamental-*-
2dnl
3dnl $Id: configure.in,v 1.10 1998/01/12 16:45:21 mdw Exp $
4dnl
5dnl Source for auto configuration for `become'
6dnl
7dnl (c) 1998 Mark Wooding
8dnl
9
10dnl----- Licensing notice ---------------------------------------------------
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
25dnl along with `become'; if not, write to the Free Software Foundation,
26dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
28dnl----- Revision history ---------------------------------------------------
29dnl
30dnl $Log: configure.in,v $
31dnl Revision 1.10 1998/01/12 16:45:21 mdw
32dnl Fix copyright date.
33dnl
34dnl Revision 1.9 1997/09/18 11:24:27 mdw
35dnl Add `conf' directory. Add an `htmldir' installation directory too.
36dnl
37dnl Revision 1.8 1997/09/17 10:36:30 mdw
38dnl Remove `set.c'. No longer necessary.
39dnl
40dnl Revision 1.7 1997/09/09 18:18:41 mdw
41dnl Check for setgroups(2), to see whether subsidiary group lists need to be
42dnl fiddled with.
43dnl
44dnl Revision 1.6 1997/09/08 13:41:14 mdw
45dnl Check for `setreuid' for changing permissions.
46dnl
47dnl Revision 1.5 1997/09/05 11:45:18 mdw
48dnl Add support for different login styles, and environment variable
49dnl manipulation in a safe and useful way.
50dnl
51dnl Revision 1.4 1997/08/20 16:10:56 mdw
52dnl Lowercase `mdw_' prefixes to macros. Add a `--with-etcdir=PATH'
53dnl option. Update `stamp-h' as required by the Automake docs (silly
54dnl me).
55dnl
56dnl Revision 1.3 1997/08/07 09:34:32 mdw
57dnl Added `ElectricFence' support, and support for the `deep' package
58dnl structure.
59dnl
60dnl Revision 1.2 1997/08/04 10:24:21 mdw
61dnl Sources placed under CVS control.
62dnl
63dnl Revision 1.1 1997/07/21 13:47:51 mdw
64dnl Initial revision
65dnl
66
67AC_INIT(src/icrypt.c)
68AC_CONFIG_HEADER(config.h)
69PACKAGE=become
70VERSION=1.2
71AC_DEFINE(VERSION, "1.2 (12 January 1998)")
72AC_SUBST(PACKAGE)
73AC_SUBST(VERSION)
74
75dnl --- Check for compilers and things ---
76
77AC_PROG_CC
78AC_PROG_INSTALL
79AC_PROG_LEX
80AC_CHECK_PROG(AR, ar, ar)
81AC_PROG_RANLIB
82AC_PROG_MAKE_SET
83AC_PROG_YACC
84AC_ARG_PROGRAM
85if test "$GCC" = "yes"; then
86 CFLAGS="$CFLAGS -pedantic -Wall"
87fi
88
89dnl --- Set default become style ---
90
91AC_ARG_ENABLE([style],
92[ --enable-style=STYLE set default style to preserve, setuser, or login],
93[case "$enableval" in
94 preserve) style="l_preserve" ;;
95 su|setuser) style="l_setuser" ;;
96 login) style="l_login" ;;
97 *) AC_MSG_ERROR([unknown login style: choose preserve, setuser, or login])
98 ;;
99esac],
100[style="l_preserve"])
101AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
102
103dnl --- Set configuration directory ---
104
105AC_ARG_WITH([etcdir],
106[ --with-etcdir=PATH set directory for configuration and key files
107 [default is /etc/become]],
108[etcdir="$withval"], [etcdir="/etc/become"])
109AC_SUBST(etcdir)
110AC_DEFINE_UNQUOTED(ETCDIR, "$etcdir")
111
112AC_ARG_WITH([htmldir],
113[ --with-htmldir=PATH set directory for HTML documentation
114 [default is PREFIX/html/become]],
115[htmldir="$withval"], [htmldir="${prefix}/html/become"])
116AC_SUBST(htmldir)
117
118dnl --- Debugging stuff ---
119
120AC_ARG_WITH(electric-fence,
121[ --with-electric-fence link programs with Electric Fence],
122 [if test "$withval" = "yes"; then
123 AC_CHECK_LIB(efence, malloc)
124 fi])
125
126AC_ARG_ENABLE(debugging,
127[ --enable-debugging spews vast swathes of useless information],
128 [if test "$enableval" = "no"; then
129 AC_DEFINE(NDEBUG, 1)
130 fi],
131 AC_DEFINE(NDEBUG, 1))
132
133AC_ARG_ENABLE(tracing,
134[ --enable-tracing enable output of tracing information],
135 [if test "$enableval" = "yes"; then
136 AC_DEFINE(TRACING)
137 fi],
138 AC_DEFINE(TRACING))
139
140dnl --- Libraries ---
141
142mdw_CHECK_MANYLIBS(socket, socket,,
143 [AC_MSG_ERROR([Socket library not found])])
144
145mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
146 [AC_MSG_ERROR([Resolver library not found])])
147
148mdw_CHECK_MANYLIBS(yp_all, nsl, AC_DEFINE(HAVE_YP))
149
150dnl --- Types ---
151
152AC_TYPE_PID_T
153AC_TYPE_UID_T
154AC_CHECK_TYPE(ssize_t, int)
155
156dnl --- Check on type sizes ---
157
158AC_CHECK_SIZEOF(int, 2)
159
160dnl --- Set the path separator ---
161
162AC_DEFINE(PATHSEP, '/')
163
164dnl --- Check for some useful functions ---
165
166AC_CHECK_FUNCS(setreuid setgroups)
167AC_CHECK_FUNCS(getrusage vtimes)
168
169dnl --- Done ---
170
171AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile,
172 [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h])
173
174dnl----- That's all, folks --------------------------------------------------