src/become.c: Reintroduce missing newline in usage message.
[become] / configure.in
1 dnl -*-m4-*-
2 dnl
3 dnl $Id$
4 dnl
5 dnl Source for auto configuration for `become'
6 dnl
7 dnl (c) 1998 Mark Wooding
8 dnl
9
10 dnl----- Licensing notice ---------------------------------------------------
11 dnl
12 dnl This file is part of `become'
13 dnl
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.
18 dnl
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.
23 dnl
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.
27
28 AC_INIT(src/become.c)
29 AM_INIT_AUTOMAKE(become, 1.4.0)
30 AM_CONFIG_HEADER(config.h)
31
32 dnl --- Check for compilers and things ---
33
34 AC_PROG_CC
35 mdw_GCC_FLAGS
36 AM_PROG_LEX
37 AC_CHECK_PROG(AR, ar, ar)
38 AC_PROG_RANLIB
39 AC_PROG_YACC
40
41 dnl --- Set default become style ---
42
43 AC_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 ;;
51 esac],
52 [style="l_preserve"])
53 AC_DEFINE_UNQUOTED([DEFAULT_LOGIN_STYLE], [$style],
54 [Default login style: l_preserve, l_setuser or l_login.])
55
56 dnl --- Choose networking options ---
57
58 AC_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
64 dnl --- Set configuration directory ---
65
66 AC_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"])
70 AC_SUBST(etcdir)
71
72 AC_ARG_WITH([pidfile],
73 [ --with-pidfile=PATH set filename for pidfile
74 [default is ETCDIR/become/pid]],
75 [pidfile="$withval"], [pidfile="${etcdir}/become.pid"])
76 AC_SUBST(pidfile)
77
78 AC_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'])
82 AC_SUBST(htmldir)
83
84 AH_TEMPLATE([ETCDIR], [Where Become should look for its configuration.])
85 AH_TEMPLATE([file_PID], [Where Become should write its process-id.])
86 mdw_DEFINE_PATHS([
87 mdw_DEFINE_PATH([ETCDIR], [$etcdir])
88 mdw_DEFINE_PATH([file_PID], [$pidfile])
89 ])
90
91 dnl --- Debugging stuff ---
92
93 mdw_OPT_EFENCE
94 mdw_OPT_NDEBUG
95 mdw_OPT_TRACE
96
97 dnl --- Libraries ---
98
99 mdw_MLIB(2.0.1)
100 mdw_CATACOMB(2.1.0)
101
102 mdw_CHECK_MANYLIBS(socket, socket,,
103 [AC_MSG_ERROR([Socket library not found.])])
104
105 mdw_CHECK_MANYLIBS(gethostbyname, resolv nsl,,
106 [AC_MSG_ERROR([Resolver library not found.])])
107
108 mdw_CHECK_MANYLIBS([yp_all], [nsl],
109 [AC_DEFINE([HAVE_YP], [1],
110 [Define if you have (and want to use) the Yellow Peril.])])
111
112 dnl --- Other functions ---
113
114 AC_CHECK_FUNCS([sigprocmask])
115
116 dnl --- Types ---
117
118 AC_TYPE_PID_T
119 AC_TYPE_UID_T
120 mdw_TYPE_SSIZE_T
121
122 dnl --- Set the path separator ---
123
124 AC_DEFINE([PATHSEP], ['/'], [Your operating system's path separator.])
125
126 dnl --- Check for some useful functions ---
127
128 AC_CHECK_FUNCS(setreuid setgroups)
129 AC_CHECK_FUNCS(getrusage vtimes)
130
131 dnl --- Done ---
132
133 AC_OUTPUT(Makefile conf/Makefile src/Makefile manual/Makefile)
134
135 dnl----- That's all, folks --------------------------------------------------