3 dnl $Id: configure.in,v 1.22 2004/04/17 10:46:08 mdw Exp $
5 dnl Source for auto configuration for `become'
7 dnl (c) 1998 Mark Wooding
10 dnl----- Licensing notice ---------------------------------------------------
12 dnl This file is part of `become'
14 dnl `Become' is free software; you can redistribute it and/or modify
15 dnl it under the terms of the GNU General Public License as published by
16 dnl the Free Software Foundation; either version 2 of the License, or
17 dnl (at your option) any later version.
19 dnl `Become' is distributed in the hope that it will be useful,
20 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 dnl GNU General Public License for more details.
24 dnl You should have received a copy of the GNU General Public License
25 dnl along with `become'; if not, write to the Free Software Foundation,
26 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 AM_INIT_AUTOMAKE(become, 1.4.0)
30 AM_CONFIG_HEADER(config.h)
32 dnl --- Check for compilers and things ---
37 AC_CHECK_PROG(AR, ar, ar)
41 dnl --- Set default become style ---
43 AC_ARG_ENABLE([style],
44 [ --enable-style=STYLE set default style to preserve, setuser, or login],
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])
53 AC_DEFINE_UNQUOTED(DEFAULT_LOGIN_STYLE, $style)
55 dnl --- Choose networking options ---
57 AC_ARG_ENABLE([network],
58 [ --disable-network disable the client-server bits of the program],
59 [if test "$enableval" = "no"; then
63 dnl --- Set configuration directory ---
66 [ --with-etcdir=PATH set directory for configuration and key files
67 [default is /etc/become]],
68 [etcdir="$withval"], [etcdir="/etc/become"])
71 AC_ARG_WITH([pidfile],
72 [ --with-pidfile=PATH set filename for pidfile
73 [default is ETCDIR/become/pid]],
74 [pidfile="$withval"], [pidfile="${etcdir}/become.pid"])
77 AC_ARG_WITH([htmldir],
78 [ --with-htmldir=PATH set directory for HTML documentation
79 [default is PREFIX/html/become]],
80 [htmldir="$withval"], [htmldir='${prefix}/html/become'])
84 mdw_DEFINE_PATH([ETCDIR], [$etcdir])
85 mdw_DEFINE_PATH([file_PID], [$pidfile])
88 dnl --- Debugging stuff ---
99 mdw_CHECK_MANYLIBS(socket, socket,,
100 [AC_MSG_ERROR([Socket library not found])])
102 mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
103 [AC_MSG_ERROR([Resolver library not found])])
105 mdw_CHECK_MANYLIBS(yp_all, nsl, AC_DEFINE(HAVE_YP))
107 dnl --- Other functions ---
109 AC_CHECK_FUNCS(sigprocmask)
117 dnl --- Set the path separator ---
119 AC_DEFINE(PATHSEP, '/')
121 dnl --- Check for some useful functions ---
123 AC_CHECK_FUNCS(setreuid setgroups)
124 AC_CHECK_FUNCS(getrusage vtimes)
128 AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile)
130 dnl----- That's all, folks --------------------------------------------------