Fix typo. Short form of `--preserve' should be `-e', not `-p'.
[become] / configure.in
CommitLineData
c4f2d992 1dnl -*-fundamental-*-
2dnl
c758e654 3dnl $Id: configure.in,v 1.10 1998/01/12 16:45:21 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 $
c758e654 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
df962e20 35dnl Add `conf' directory. Add an `htmldir' installation directory too.
36dnl
37dnl Revision 1.8 1997/09/17 10:36:30 mdw
f36dccc8 38dnl Remove `set.c'. No longer necessary.
39dnl
ffbfa517 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.
f81d049a 43dnl
f36dccc8 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
1bda7a39 56dnl Revision 1.3 1997/08/07 09:34:32 mdw
f81d049a 57dnl Added `ElectricFence' support, and support for the `deep' package
58dnl structure.
1bda7a39 59dnl
03f996bd 60dnl Revision 1.2 1997/08/04 10:24:21 mdw
61dnl Sources placed under CVS control.
c4f2d992 62dnl
1bda7a39 63dnl Revision 1.1 1997/07/21 13:47:51 mdw
64dnl Initial revision
65dnl
c4f2d992 66
1bda7a39 67AC_INIT(src/icrypt.c)
c4f2d992 68AC_CONFIG_HEADER(config.h)
c758e654 69PACKAGE=become
70VERSION=1.2
71AC_DEFINE(VERSION, "1.2 (12 January 1998)")
03f996bd 72AC_SUBST(PACKAGE)
73AC_SUBST(VERSION)
c4f2d992 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
1bda7a39 82AC_PROG_MAKE_SET
c4f2d992 83AC_PROG_YACC
03f996bd 84AC_ARG_PROGRAM
f36dccc8 85if test "$GCC" = "yes"; then
c4f2d992 86 CFLAGS="$CFLAGS -pedantic -Wall"
87fi
88
387501ae 89dnl --- Set default become style ---
90
91AC_ARG_ENABLE([style],
ffbfa517 92[ --enable-style=STYLE set default style to preserve, setuser, or login],
f36dccc8 93[case "$enableval" in
387501ae 94 preserve) style="l_preserve" ;;
ffbfa517 95 su|setuser) style="l_setuser" ;;
387501ae 96 login) style="l_login" ;;
f36dccc8 97 *) AC_MSG_ERROR([unknown login style: choose preserve, setuser, or login])
98 ;;
387501ae 99esac],
100[style="l_preserve"])
101AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
102
f81d049a 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
df962e20 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
c4f2d992 118dnl --- Debugging stuff ---
119
1bda7a39 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
c4f2d992 126AC_ARG_ENABLE(debugging,
03f996bd 127[ --enable-debugging spews vast swathes of useless information],
c4f2d992 128 [if test "$enableval" = "no"; then
129 AC_DEFINE(NDEBUG, 1)
130 fi],
131 AC_DEFINE(NDEBUG, 1))
132
03f996bd 133AC_ARG_ENABLE(tracing,
134[ --enable-tracing enable output of tracing information],
135 [if test "$enableval" = "yes"; then
136 AC_DEFINE(TRACING)
c4f2d992 137 fi],
03f996bd 138 AC_DEFINE(TRACING))
c4f2d992 139
f36dccc8 140dnl --- Libraries ---
141
142mdw_CHECK_MANYLIBS(socket, socket,,
c758e654 143 [AC_MSG_ERROR([Socket library not found])])
f36dccc8 144
145mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
c758e654 146 [AC_MSG_ERROR([Resolver library not found])])
f36dccc8 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
c4f2d992 169dnl --- Done ---
170
df962e20 171AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile,
f81d049a 172 [test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h])
c4f2d992 173
174dnl----- That's all, folks --------------------------------------------------