aboutsummaryrefslogtreecommitdiff
path: root/configure.boot
diff options
context:
space:
mode:
Diffstat (limited to 'configure.boot')
-rw-r--r--configure.boot315
1 files changed, 315 insertions, 0 deletions
diff --git a/configure.boot b/configure.boot
new file mode 100644
index 0000000..e518ece
--- /dev/null
+++ b/configure.boot
@@ -0,0 +1,315 @@
1## This file is a source for configure.ac. -*- autoconf -*-
2## Run ./bootstrap to create it.
3## Run ./bootstrap --help for a detailed description.
4## A short reminder:
5## 1. Comments starting with ## are removed from the output.
6## 2. A construct <NAME> is replaced with the value of the variable NAME.
7## 3. <NAME#TEXT> on a line alone (arbitrary leading characters allowed)
8## is replaced with (multiline) expansion of NAME. The second and
9## subsequent lines are prefixed with TEXT (or leading characters, if
10## TEXT is empty).
11## 4. Everything else is reproduced verbatim.
12dnl <HEADING#>
13dnl Process this file with -*- autoconf -*- to produce a configure script.
14# This file is part of GNU Dico
15# Copyright (C) 1998-2000, 2008-2010, 2012-2016 Sergey Poznyakoff
16#
17# GNU Dico is free software; you can redistribute it and/or modify
18# it under the terms of the GNU General Public License as published by
19# the Free Software Foundation; either version 3, or (at your option)
20# any later version.
21#
22# GNU Dico is distributed in the hope that it will be useful,
23# but WITHOUT ANY WARRANTY; without even the implied warranty of
24# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25# GNU General Public License for more details.
26#
27# You should have received a copy of the GNU General Public License
28# along with GNU Dico. If not, see <http://www.gnu.org/licenses/>.
29
30AC_PREREQ(2.63)
31AC_INIT([GNU dico], 2.2.90, [bug-dico@gnu.org])
32AC_CONFIG_SRCDIR([dicod/main.c])
33AM_CONFIG_HEADER(config.h)
34AC_CONFIG_AUX_DIR([build-aux])
35AC_CONFIG_MACRO_DIR(m4)
36AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 dist-xz std-options subdir-objects])
37
38dnl Enable silent rules by default:
39AM_SILENT_RULES([yes])
40
41dnl Some variables
42AC_SUBST(DICO_MODDIR,'$(libdir)/$(PACKAGE)')
43
44dnl Checks for programs.
45AC_PROG_CC
46gl_EARLY
47AC_PROG_CPP
48AC_PROG_AWK
49AC_PROG_YACC
50AC_PROG_LEX
51
52LT_PREREQ(2.4)
53LT_CONFIG_LTDL_DIR([libltdl])
54LT_INIT([dlopen])
55LTDL_INIT([recursive])
56LT_WITH_LTDL
57AC_CONFIG_FILES([libltdl/Makefile])
58
59dnl Checks for libraries.
60AC_CHECK_LIB(socket, socket)
61AC_CHECK_LIB(nsl, gethostbyaddr)
62AC_CHECK_LIB(rt, nanosleep)
63
64dnl Checks for header files.
65AC_HEADER_DIRENT dnl not needed ?
66AC_HEADER_STDC
67AC_HEADER_SYS_WAIT
68AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/time.h \
69 sys/socket.h socket.h syslog.h unistd.h \
70 crypt.h readline/readline.h)
71
72dnl Checks for typedefs, structures, and compiler characteristics.
73gl_INIT
74
75AC_C_CONST
76AC_C_INLINE
77AC_TYPE_PID_T
78AC_TYPE_OFF_T
79AC_TYPE_SIZE_T
80AC_HEADER_TIME
81AC_CHECK_TYPE([socklen_t],,
82 AC_DEFINE(socklen_t, int, [Define to int if <sys/types.h> does not define]),
83[
84#if HAVE_SYS_TYPES_H
85# include <sys/types.h>
86#endif
87#ifdef HAVE_SYS_SOCKET_H
88# include <sys/socket.h>
89#endif
90#ifdef HAVE_SOCKET_H
91# include <socket.h>
92#endif
93])
94
95dnl Checks for library functions.
96AC_TYPE_SIGNAL
97AC_CHECK_FUNCS(gethostname select socket strdup strerror strtol \
98 setegid setregid setresgid seteuid setreuid \
99 sysconf getdtablesize)
100
101# Crypt
102AC_CHECK_DECLS(crypt,,,[
103#include <unistd.h>
104#ifdef HAVE_CRYPT_H
105# include <crypt.h>
106#endif])
107AH_BOTTOM([
108#if !HAVE_DECL_CRYPT
109char *crypt(const char *key, const char *salt);
110#endif])
111
112AC_CHECK_LIB(crypt, crypt)
113
114# Gettext.
115AM_ICONV
116AM_GNU_GETTEXT([external], [need-formatstring-macros])
117AM_GNU_GETTEXT_VERSION([0.18])
118AC_CONFIG_LINKS(include/gettext.h:gnu/gettext.h)
119
120# Check for zlib
121AC_CHECK_HEADER(zlib.h,
122 AC_CHECK_LIB(z, inflate,
123 [AC_DEFINE_UNQUOTED([USE_LIBZ], 1,
124 [Define this if you have libz library])
125 AC_SUBST(LIBZ, -lz)]))
126
127LOG_FACILITY="LOG_DAEMON"
128
129AC_ARG_VAR([LOG_FACILITY],
130 [Default syslog facility])
131if test -n "$LOG_FACILITY"; then
132 logfacility=`echo $LOG_FACILITY | tr a-z A-Z`
133 case $logfacility in
134 USER|DAEMON|AUTH|AUTHPRIV|MAIL|CRON|LOCAL[[0-7]])
135 LOG_FACILITY=LOG_$logfacility;;
136 LOG_USER|LOG_DAEMON|LOG_AUTH|LOG_AUTHPRIV|LOG_MAIL|LOG_CRON|LOG_LOCAL[[0-7]])
137 LOG_FACILITY=$logfacility;;
138 *) AC_MSG_ERROR([Invalid value of LOG_FACILITY]);;
139 esac
140fi
141AC_DEFINE_UNQUOTED([LOG_FACILITY],$LOG_FACILITY,
142 [Default syslog facility.])
143
144AC_ARG_VAR([DEFAULT_DICT_SERVER],
145 [Set the name of the default DICT server for dico utility])
146if test -z "$DEFAULT_DICT_SERVER" ; then
147 DEFAULT_DICT_SERVER="gnu.org.ua"
148fi
149
150AC_ARG_VAR([DEFAULT_INCLUDE_DIR],
151 [Default preprocessor include directory])
152if test -z "$DEFAULT_INCLUDE_DIR"; then
153 DEFAULT_INCLUDE_DIR='$(pkgdatadir)/include'
154fi
155AC_ARG_VAR([DEFAULT_VERSION_INCLUDE_DIR],
156 [Default version-specific include directory])
157if test -z "$DEFAULT_VERSION_INCLUDE_DIR"; then
158 DEFAULT_VERSION_INCLUDE_DIR='$(pkgdatadir)/$(VERSION)/include'
159fi
160
161# Grecs configuration system
162GRECS_SETUP(grecs, [shared tests getopt git2chg std-pp-setup sockaddr-list])
163GRECS_HOST_PROJECT_INCLUDES='-I$(top_srcdir)/gnu -I$(top_builddir)/gnu'
164
165# Tcl/tk
166AC_ARG_WITH([tk],
167 AC_HELP_STRING([--with-tk],
168 [build Tcl/Tk-based applications (GCIDER)]),
169 [
170case "${withval}" in
171 yes) status_tk=yes ;;
172 no) status_tk=no;;
173 *) AC_MSG_ERROR([bad value ${withval} for --with-tk])
174esac],[status_tk=yes])
175
176if test $status_tk=yes; then
177 AC_PATH_PROG([WISH], wish)
178 if test -z "$WISH"; then
179 status_tk=no
180 fi
181 AM_CONDITIONAL([TK_WISH_COND],[test $status_tk = yes])
182fi
183#
184AC_ARG_WITH(autologin-file,
185 AC_HELP_STRING([--with-autologin-file@<:@=NAME@:>@],
186 [Use the autologin file (default NAME is .dicologin)]),
187 [case $withval in
188 yes) DEFAULT_AUTOLOGIN_FILE=".dicologin";;
189 no) DEFAULT_AUTOLOGIN_FILE=;;
190 *) DEFAULT_AUTOLOGIN_FILE=$withval;;
191 esac],
192 [DEFAULT_AUTOLOGIN_FILE=".dicologin"])
193if test -n "$DEFAULT_AUTOLOGIN_FILE" ; then
194 AC_DEFINE_UNQUOTED(DEFAULT_AUTOLOGIN_FILE, "$DEFAULT_AUTOLOGIN_FILE",
195 [Define to the name of a netrc-style autologin file])
196else
197 AC_DEFINE_UNQUOTED(DEFAULT_AUTOLOGIN_FILE, NULL,
198 [Define to the name of a netrc-style autologin file])
199fi
200
201AC_ARG_WITH([readline],
202 AC_HELP_STRING([--without-readline],
203 [do not use readline]),
204 [
205case "${withval}" in
206 yes) status_readline=yes ;;
207 no) status_readline=no ;;
208 *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;;
209esac],[status_readline=yes])
210
211# Test for GNU Readline
212AC_SUBST(READLINE_LIBS)
213
214if test "$status_readline" != "no"; then
215
216 dnl FIXME This should only link in the curses libraries if it's
217 dnl really needed!
218
219 dnl Check for Curses libs.
220 CURSES_LIBS=
221 for lib in ncurses curses termcap
222 do
223 AC_CHECK_LIB($lib, tputs, [CURSES_LIBS="-l$lib"; break])
224 done
225
226 saved_LIBS=$LIBS
227 LIBS="$LIBS $CURSES_LIBS"
228 AC_CHECK_LIB(readline, readline, mf_have_readline=yes)
229 LIBS=$saved_LIBS
230
231 if test "$mf_have_readline" = "yes"; then
232 AC_CHECK_HEADERS(readline/readline.h,
233 AC_DEFINE(WITH_READLINE,1,[Enable use of readline]))
234 READLINE_LIBS="-lreadline $CURSES_LIBS"
235 saved_LIBS=$LIBS
236 LIBS="$LIBS $READLINE_LIBS"
237 AC_CHECK_FUNCS(rl_completion_matches)
238 LIBS=$saved_LIBS
239 status_readline="yes"
240 else
241 if test "$status_readline" = "yes"; then
242 AC_MSG_WARN(readline requested but does not seem to be installed)
243 fi
244 status_readline="no"
245 fi
246fi
247
248AH_BOTTOM([