Expunge revision histories in files.
[become] / configure.in
CommitLineData
b0f66028 1dnl -*-m4-*-
c4f2d992 2dnl
af4f4d6a 3dnl $Id: configure.in,v 1.21 2004/04/08 01:36:20 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
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"])
53AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
54
45732897 55dnl --- Choose networking options ---
56
57AC_ARG_ENABLE([network],
58[ --disable-network disable the client-server bits of the program],
59 [if test "$enableval" = "no"; then
60 AC_DEFINE(NONETWORK)
61 fi])
62
f81d049a 63dnl --- Set configuration directory ---
64
65AC_ARG_WITH([etcdir],
66[ --with-etcdir=PATH set directory for configuration and key files
67 [default is /etc/become]],
68[etcdir="$withval"], [etcdir="/etc/become"])
69AC_SUBST(etcdir)
b0f66028 70
71AC_ARG_WITH([pidfile],
72[ --with-pidfile=PATH set filename for pidfile
73 [default is ETCDIR/become/pid]],
74[pidfile="$withval"], [pidfile="${etcdir}/become.pid"])
75AC_SUBST(pidfile)
f81d049a 76
df962e20 77AC_ARG_WITH([htmldir],
78[ --with-htmldir=PATH set directory for HTML documentation
79 [default is PREFIX/html/become]],
07981d85 80[htmldir="$withval"], [htmldir='${prefix}/html/become'])
df962e20 81AC_SUBST(htmldir)
82
b0f66028 83mdw_DEFINE_PATHS([
84 mdw_DEFINE_PATH([ETCDIR], [$etcdir])
85 mdw_DEFINE_PATH([file_PID], [$pidfile])
86])
87
c4f2d992 88dnl --- Debugging stuff ---
89
f60a3434 90mdw_OPT_EFENCE
91mdw_OPT_NDEBUG
92mdw_OPT_TRACE
c4f2d992 93
f36dccc8 94dnl --- Libraries ---
95
f60a3434 96mdw_MLIB(2.0.1)
97mdw_CATACOMB(2.0.1)
98
f36dccc8 99mdw_CHECK_MANYLIBS(socket, socket,,
c758e654 100 [AC_MSG_ERROR([Socket library not found])])
f36dccc8 101
102mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
c758e654 103 [AC_MSG_ERROR([Resolver library not found])])
f36dccc8 104
105mdw_CHECK_MANYLIBS(yp_all, nsl, AC_DEFINE(HAVE_YP))
106
82399d0a 107dnl --- Other functions ---
108
109AC_CHECK_FUNCS(sigprocmask)
110
f36dccc8 111dnl --- Types ---
112
113AC_TYPE_PID_T
114AC_TYPE_UID_T
98661ef5 115mdw_TYPE_SSIZE_T
f36dccc8 116
f36dccc8 117dnl --- Set the path separator ---
118
119AC_DEFINE(PATHSEP, '/')
120
121dnl --- Check for some useful functions ---
122
123AC_CHECK_FUNCS(setreuid setgroups)
124AC_CHECK_FUNCS(getrusage vtimes)
125
c4f2d992 126dnl --- Done ---
127
b6ea915c 128AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile)
c4f2d992 129
130dnl----- That's all, folks --------------------------------------------------