Trivial script to add symlinks to EBI-like software repostitories.
[sw-tools] / configure.in
CommitLineData
3315e8b3 1dnl -*-fundamental-*-
2dnl
b2f455ee 3dnl $Id: configure.in,v 1.2 1999/06/04 13:56:36 mdw Exp $
3315e8b3 4dnl
5dnl Configuration for sw-tools
6dnl
7dnl (c) 1999 EBI
8dnl
9
10dnl ----- Licensing notice --------------------------------------------------
11dnl
12dnl This file is part of sw-tools.
13dnl
14dnl sw-tools is free software; you can redistribute it and/or modify
15dnl it under the terms of the GNU General Public License as published by
16dnl the Free Software Foundation; either version 2 of the License, or
17dnl (at your option) any later version.
18dnl
19dnl sw-tools is distributed in the hope that it will be useful,
20dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
21dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22dnl GNU General Public License for more details.
23dnl
24dnl You should have received a copy of the GNU General Public License
25dnl along with sw-tools; if not, write to the Free Software Foundation,
26dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27
28dnl ----- Revision history --------------------------------------------------
29dnl
30dnl $Log: configure.in,v $
b2f455ee 31dnl Revision 1.2 1999/06/04 13:56:36 mdw
32dnl Bump version.
33dnl
34dnl Revision 1.1.1.1 1999/06/02 16:53:33 mdw
35dnl Initial import.
3315e8b3 36dnl
37
38dnl --- Boring boilerplate ---
39
40AC_INIT(src/sw.c)
b2f455ee 41AM_INIT_AUTOMAKE(sw-tools, 1.0.0pre4)
3315e8b3 42AM_CONFIG_HEADER(config.h)
43
44dnl --- Work out the architecture name ---
45
46AC_MSG_CHECKING([architecture name])
47arch=`$srcdir/sw.in --archname`
48AC_MSG_RESULT($arch)
49AC_DEFINE_UNQUOTED(ARCH, "$arch")
50AC_SUBST(arch)
51
52dnl --- Set up the C compiler ---
53
54AC_PROG_CC
55mdw_GCC_FLAGS
56
57dnl --- Check for <unistd.h> ---
58
59AC_CHECK_HEADERS(unistd.h)
60
61dnl --- Find an appropriate remote shell program ---
62
63AC_ARG_WITH(rsh,
64[ --with-rsh=PROGRAM use PROGRAM to start remote shells],
65[RSH=$withval])
66AC_PATH_PROGS(RSH, $RSH remsh rsh ssh, rsh)
67AC_DEFINE_UNQUOTED(RSH, "$RSH")
68
69dnl --- Find out whether I have `strsignal' or `sys_siglist' ---
70
71AC_CHECK_FUNCS(strsignal _sys_siglist, break)
72
73dnl --- Decide whether to declare `environ' ---
74
75AC_CACHE_CHECK([for declaration of \`environ'], sw_cv_environ,
76[AC_EGREP_CPP(environ,
77[#include <sys/types.h>
78#if HAVE_UNISTD_H
79#include <unistd.h>
80#endif
81#if STDC_HEADERS
82#include <stdlib.h>
83#include <stddef.h>
84#endif], [sw_cv_environ=yes], [sw_cv_environ=no])])
85if test $sw_cv_environ = yes; then
86 AC_DEFINE(DECL_ENVIRON)
87fi
88
89dnl --- Find a curses library ---
90dnl
91dnl Try to find one which knows how to resize a terminal.
92
93mdw_CHECK_MANYLIBS(newwin, ncurses curses, AC_DEFINE(HAVE_CURSES))
94
95if test $mdw_cv_lib_newwin != no; then
96AC_CHECK_HEADERS([ncurses.h ncurses/ncurses.h curses.h], [break])
97
98if test "$ac_cv_header_ncurses_h" = "no" &&
99 test "$ac_cv_header_ncurses_ncurses_h" = "no" &&
100 test "$ac_cv_header_curses_h" = "no"; then
101 AC_MSG_WARN([couldn't find a \`curses' header. Assuming \`curses.h'.])
102 AC_DEFINE(HAVE_CURSES_H)
103fi
104
105AC_CHECK_FUNCS(wresize)
106fi
107
108
109dnl --- Other handy libraries ---
110
111mdw_CHECK_MANYLIBS(socketpair, socket)
112
113dnl --- Various standard types ---
114
115AC_TYPE_PID_T
116AC_TYPE_SIZE_T
117AC_TYPE_UID_T
118
119AC_CACHE_CHECK(for ssize_t, sw_cv_ssize_t,
120[AC_EGREP_CPP(ssize_t,
121[#include <sys/types.h>
122#if HAVE_UNISTD_H
123#include <unistd.h>
124#endif
125#if STDC_HEADERS
126#include <stdlib.h>
127#include <stddef.h>
128#endif],
129[sw_cv_ssize_t=yes], [sw_cv_ssize_t=no])])
130
131if test $sw_cv_ssize_t = no; then
132 AC_DEFINE(ssize_t, int)
133fi
134
135dnl --- Write in some useful paths ---
136
137mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix
138transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'`
139test "$prefix" = "NONE" && prefix=$ac_default_prefix
140test "$exec_prefix" = "NONE" && exec_prefix=$prefix
141SW=`echo sw|sed "$transform"`
142AC_SUBST(SW)
143AC_DEFINE_UNQUOTED(PREFIX, "$mdw_prefix")
144AC_DEFINE_UNQUOTED(BINDIR, "`eval echo $bindir`")
145AC_DEFINE_UNQUOTED(DATADIR, "`eval echo $datadir`")
146AC_DEFINE_UNQUOTED(SW, "$SW")
147prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix
148
149dnl --- Output the configuration ---
150
151AC_CONFIG_SUBDIRS(mLib)
152AC_OUTPUT(Makefile src/Makefile sw)
153
154dnl ----- That's all, folks -------------------------------------------------