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