chiark / gitweb /
Merge some changes from 1.0.4. Very odd.
[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)
165b3d5c 22AM_INIT_AUTOMAKE(sw-tools, 1.0.5mdw1)
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)
30AC_DEFINE_UNQUOTED(ARCH, "$arch")
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)
49AC_DEFINE_UNQUOTED(RSH, "$RSH")
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
66mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix
67transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'`
68test "$prefix" = "NONE" && prefix=$ac_default_prefix
69test "$exec_prefix" = "NONE" && exec_prefix=$prefix
70SW=`echo sw|sed "$transform"`
71AC_SUBST(SW)
72AC_DEFINE_UNQUOTED(PREFIX, "$mdw_prefix")
73AC_DEFINE_UNQUOTED(BINDIR, "`eval echo $bindir`")
74AC_DEFINE_UNQUOTED(DATADIR, "`eval echo $datadir`")
75AC_DEFINE_UNQUOTED(SW, "$SW")
de50c780 76pkgdatadir="`eval echo $datadir/sw`"
77AC_SUBST(pkgdatadir)
3315e8b3 78prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix
79
80dnl --- Output the configuration ---
81
0e0feb0b 82AC_OUTPUT(dnl
83 Makefile src/Makefile perl/Makefile dnl
84 perl/SWConfig.pm perl/sw perl/sw-tidy dnl
85 sw sw-share dnl
86)
3315e8b3 87
88dnl ----- That's all, folks -------------------------------------------------