Build separately from mLib.
[sw-tools] / configure.in
1 dnl -*-fundamental-*-
2 dnl
3 dnl $Id: configure.in,v 1.10 1999/11/11 20:24:37 mdw Exp $
4 dnl
5 dnl Configuration for sw-tools
6 dnl
7 dnl (c) 1999 EBI
8 dnl
9
10 dnl ----- Licensing notice --------------------------------------------------
11 dnl
12 dnl This file is part of sw-tools.
13 dnl
14 dnl sw-tools 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 sw-tools 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 sw-tools; if not, write to the Free Software Foundation,
26 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
28 dnl ----- Revision history --------------------------------------------------
29 dnl
30 dnl $Log: configure.in,v $
31 dnl Revision 1.10 1999/11/11 20:24:37 mdw
32 dnl Build separately from mLib.
33 dnl
34 dnl Revision 1.9 1999/09/24 13:17:53 mdw
35 dnl Version bump.
36 dnl
37 dnl Revision 1.7 1999/07/30 18:45:36 mdw
38 dnl Configure the Perl bits.
39 dnl
40 dnl Revision 1.6 1999/07/28 09:31:49 mdw
41 dnl Small amounts of tidying.
42 dnl
43 dnl Revision 1.5 1999/07/16 12:46:04 mdw
44 dnl First proper release version.
45 dnl
46 dnl Revision 1.3 1999/06/18 18:59:39 mdw
47 dnl Preliminary work for Perl scripts.
48 dnl
49 dnl Revision 1.1.1.1 1999/06/02 16:53:33 mdw
50 dnl Initial import.
51 dnl
52
53 dnl --- Boring boilerplate ---
54
55 AC_INIT(src/sw.c)
56 AM_INIT_AUTOMAKE(sw-tools, 1.0.3)
57 AM_CONFIG_HEADER(config.h)
58
59 dnl --- Work out the architecture name ---
60
61 AC_MSG_CHECKING([architecture name])
62 arch=`$srcdir/sw.in --archname`
63 AC_MSG_RESULT($arch)
64 AC_DEFINE_UNQUOTED(ARCH, "$arch")
65 AC_SUBST(arch)
66
67 dnl --- Set up the C compiler ---
68
69 AC_PROG_CC
70 mdw_GCC_FLAGS
71
72 dnl --- Find a Perl ---
73
74 mdw_PROG_PERL(5.003)
75 mdw_CHECK_PERL(5.003)
76
77 dnl --- Find an appropriate remote shell program ---
78
79 AC_ARG_WITH(rsh,
80 [ --with-rsh=PROGRAM use PROGRAM to start remote shells],
81 [RSH=$withval])
82 AC_PATH_PROGS(RSH, $RSH remsh rsh ssh, rsh)
83 AC_DEFINE_UNQUOTED(RSH, "$RSH")
84
85 dnl --- Various simple tests ---
86
87 AC_CHECK_HEADERS(unistd.h)
88 mdw_DECL_ENVIRON
89 AC_TYPE_PID_T
90 AC_TYPE_SIZE_T
91 AC_TYPE_UID_T
92 mdw_TYPE_SSIZE_T
93 AC_CHECK_FUNCS(strsignal _sys_siglist, break)
94 mdw_CURSES
95 mdw_MLIB
96 mdw_CHECK_MANYLIBS(socketpair, socket)
97
98 dnl --- Write in some useful paths ---
99
100 mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix
101 transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'`
102 test "$prefix" = "NONE" && prefix=$ac_default_prefix
103 test "$exec_prefix" = "NONE" && exec_prefix=$prefix
104 SW=`echo sw|sed "$transform"`
105 AC_SUBST(SW)
106 AC_DEFINE_UNQUOTED(PREFIX, "$mdw_prefix")
107 AC_DEFINE_UNQUOTED(BINDIR, "`eval echo $bindir`")
108 AC_DEFINE_UNQUOTED(DATADIR, "`eval echo $datadir`")
109 AC_DEFINE_UNQUOTED(SW, "$SW")
110 pkgdatadir="`eval echo $datadir/sw`"
111 AC_SUBST(pkgdatadir)
112 prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix
113
114 dnl --- Output the configuration ---
115
116 AC_OUTPUT(dnl
117 Makefile src/Makefile perl/Makefile dnl
118 perl/SWConfig.pm perl/sw perl/sw-tidy dnl
119 sw sw-share dnl
120 )
121
122 dnl ----- That's all, folks -------------------------------------------------