src/become.c: Reintroduce missing newline in usage message.
[become] / configure.in
... / ...
CommitLineData
1dnl -*-m4-*-
2dnl
3dnl $Id$
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
28AC_INIT(src/become.c)
29AM_INIT_AUTOMAKE(become, 1.4.0)
30AM_CONFIG_HEADER(config.h)
31
32dnl --- Check for compilers and things ---
33
34AC_PROG_CC
35mdw_GCC_FLAGS
36AM_PROG_LEX
37AC_CHECK_PROG(AR, ar, ar)
38AC_PROG_RANLIB
39AC_PROG_YACC
40
41dnl --- Set default become style ---
42
43AC_ARG_ENABLE([style],
44[ --enable-style=STYLE set default style to preserve, setuser, or login],
45[case "$enableval" in
46 preserve) style="l_preserve" ;;
47 su|setuser) style="l_setuser" ;;
48 login) style="l_login" ;;
49 *) AC_MSG_ERROR([unknown login style: choose preserve, setuser, or login])
50 ;;
51esac],
52[style="l_preserve"])
53AC_DEFINE_UNQUOTED([DEFAULT_LOGIN_STYLE], [$style],
54 [Default login style: l_preserve, l_setuser or l_login.])
55
56dnl --- Choose networking options ---
57
58AC_ARG_ENABLE([network],
59[ --disable-network disable the client-server bits of the program],
60 [if test "$enableval" = "no"; then
61 AC_DEFINE([NONETWORK], [1], [Define to disable network support.])
62 fi])
63
64dnl --- Set configuration directory ---
65
66AC_ARG_WITH([etcdir],
67[ --with-etcdir=PATH set directory for configuration and key files
68 [default is /etc/become]],
69[etcdir="$withval"], [etcdir="/etc/become"])
70AC_SUBST(etcdir)
71
72AC_ARG_WITH([pidfile],
73[ --with-pidfile=PATH set filename for pidfile
74 [default is ETCDIR/become/pid]],
75[pidfile="$withval"], [pidfile="${etcdir}/become.pid"])
76AC_SUBST(pidfile)
77
78AC_ARG_WITH([htmldir],
79[ --with-htmldir=PATH set directory for HTML documentation
80 [default is PREFIX/html/become]],
81[htmldir="$withval"], [htmldir='${prefix}/html/become'])
82AC_SUBST(htmldir)
83
84AH_TEMPLATE([ETCDIR], [Where Become should look for its configuration.])
85AH_TEMPLATE([file_PID], [Where Become should write its process-id.])
86mdw_DEFINE_PATHS([
87 mdw_DEFINE_PATH([ETCDIR], [$etcdir])
88 mdw_DEFINE_PATH([file_PID], [$pidfile])
89])
90
91dnl --- Debugging stuff ---
92
93mdw_OPT_EFENCE
94mdw_OPT_NDEBUG
95mdw_OPT_TRACE
96
97dnl --- Libraries ---
98
99mdw_MLIB(2.0.1)
100mdw_CATACOMB(2.1.0)
101
102mdw_CHECK_MANYLIBS(socket, socket,,
103 [AC_MSG_ERROR([Socket library not found.])])
104
105mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
106 [AC_MSG_ERROR([Resolver library not found.])])
107
108mdw_CHECK_MANYLIBS([yp_all], [nsl],
109 [AC_DEFINE([HAVE_YP], [1],
110 [Define if you have (and want to use) the Yellow Peril.])])
111
112dnl --- Other functions ---
113
114AC_CHECK_FUNCS([sigprocmask])
115
116dnl --- Types ---
117
118AC_TYPE_PID_T
119AC_TYPE_UID_T
120mdw_TYPE_SSIZE_T
121
122dnl --- Set the path separator ---
123
124AC_DEFINE([PATHSEP], ['/'], [Your operating system's path separator.])
125
126dnl --- Check for some useful functions ---
127
128AC_CHECK_FUNCS(setreuid setgroups)
129AC_CHECK_FUNCS(getrusage vtimes)
130
131dnl --- Done ---
132
133AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile)
134
135dnl----- That's all, folks --------------------------------------------------