usage: Print metavariables in SHOUTY letters.
[sw-tools] / configure.in
CommitLineData
3315e8b3 1dnl ----- Licensing notice --------------------------------------------------
2dnl
3dnl This file is part of sw-tools.
4dnl
5dnl sw-tools is free software; you can redistribute it and/or modify
6dnl it under the terms of the GNU General Public License as published by
7dnl the Free Software Foundation; either version 2 of the License, or
8dnl (at your option) any later version.
9dnl
10dnl sw-tools is distributed in the hope that it will be useful,
11dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
12dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13dnl GNU General Public License for more details.
14dnl
15dnl You should have received a copy of the GNU General Public License
16dnl along with sw-tools; if not, write to the Free Software Foundation,
17dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18
3315e8b3 19dnl --- Boring boilerplate ---
20
21AC_INIT(src/sw.c)
c941b721 22AM_INIT_AUTOMAKE(sw-tools, 1.0.5mdw2)
3315e8b3 23AM_CONFIG_HEADER(config.h)
24
25dnl --- Work out the architecture name ---
26
27AC_MSG_CHECKING([architecture name])
28arch=`$srcdir/sw.in --archname`
29AC_MSG_RESULT($arch)
c941b721 30AC_DEFINE_UNQUOTED(ARCH, "$arch", [My architecture name.])
3315e8b3 31AC_SUBST(arch)
32
33dnl --- Set up the C compiler ---
34
35AC_PROG_CC
36mdw_GCC_FLAGS
37
de50c780 38dnl --- Find a Perl ---
39
40mdw_PROG_PERL(5.003)
41mdw_CHECK_PERL(5.003)
42
3315e8b3 43dnl --- Find an appropriate remote shell program ---
44
45AC_ARG_WITH(rsh,
46[ --with-rsh=PROGRAM use PROGRAM to start remote shells],
47[RSH=$withval])
48AC_PATH_PROGS(RSH, $RSH remsh rsh ssh, rsh)
c941b721 49AC_DEFINE_UNQUOTED(RSH, "$RSH", [Default remote shell program.])
3315e8b3 50
22c1e3f5 51dnl --- Various simple tests ---
3315e8b3 52
22c1e3f5 53AC_CHECK_HEADERS(unistd.h)
54mdw_DECL_ENVIRON
3315e8b3 55AC_TYPE_PID_T
56AC_TYPE_SIZE_T
57AC_TYPE_UID_T
22c1e3f5 58mdw_TYPE_SSIZE_T
59AC_CHECK_FUNCS(strsignal _sys_siglist, break)
60mdw_CURSES
c629200b 61mdw_MLIB
22c1e3f5 62mdw_CHECK_MANYLIBS(socketpair, socket)
3315e8b3 63
64dnl --- Write in some useful paths ---
65
c941b721
MW
66
67mdw_DEFINE_PATHS([
68 mdw_DEFINE_PATH([PREFIX], [$prefix])
69 mdw_DEFINE_PATH([DATADIR], [$datadir])
70 mdw_DEFINE_PATH([ARCHTAB], [$datadir/archtab])
71 mdw_DEFINE_PROG([PATH_SW], [sw])
72 pkgdatadir=mdw_PATH([$datadir/$PACKAGE]) AC_SUBST(pkgdatadir)
73 SW=mdw_PROG(sw) AC_SUBST(SW)
74])
3315e8b3 75
76dnl --- Output the configuration ---
77
0e0feb0b 78AC_OUTPUT(dnl
79 Makefile src/Makefile perl/Makefile dnl
80 perl/SWConfig.pm perl/sw perl/sw-tidy dnl
81 sw sw-share dnl
82)
3315e8b3 83
84dnl ----- That's all, folks -------------------------------------------------