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