diff options
Diffstat (limited to 'configure.boot')
-rw-r--r-- | configure.boot | 315 |
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. | ||
12 | dnl <HEADING#> | ||
13 | dnl 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 | |||
30 | AC_PREREQ(2.63) | ||
31 | AC_INIT([GNU dico], 2.2.90, [bug-dico@gnu.org]) | ||
32 | AC_CONFIG_SRCDIR([dicod/main.c]) | ||
33 | AM_CONFIG_HEADER(config.h) | ||
34 | AC_CONFIG_AUX_DIR([build-aux]) | ||
35 | AC_CONFIG_MACRO_DIR(m4) | ||
36 | AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-bzip2 dist-xz std-options subdir-objects]) | ||
37 | |||
38 | dnl Enable silent rules by default: | ||
39 | AM_SILENT_RULES([yes]) | ||
40 | |||
41 | dnl Some variables | ||
42 | AC_SUBST(DICO_MODDIR,'$(libdir)/$(PACKAGE)') | ||
43 | |||
44 | dnl Checks for programs. | ||
45 | AC_PROG_CC | ||
46 | gl_EARLY | ||
47 | AC_PROG_CPP | ||
48 | AC_PROG_AWK | ||
49 | AC_PROG_YACC | ||
50 | AC_PROG_LEX | ||
51 | |||
52 | LT_PREREQ(2.4) | ||
53 | LT_CONFIG_LTDL_DIR([libltdl]) | ||
54 | LT_INIT([dlopen]) | ||
55 | LTDL_INIT([recursive]) | ||
56 | LT_WITH_LTDL | ||
57 | AC_CONFIG_FILES([libltdl/Makefile]) | ||
58 | |||
59 | dnl Checks for libraries. | ||
60 | AC_CHECK_LIB(socket, socket) | ||
61 | AC_CHECK_LIB(nsl, gethostbyaddr) | ||
62 | AC_CHECK_LIB(rt, nanosleep) | ||
63 | |||
64 | dnl Checks for header files. | ||
65 | AC_HEADER_DIRENT dnl not needed ? | ||
66 | AC_HEADER_STDC | ||
67 | AC_HEADER_SYS_WAIT | ||
68 | AC_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 | |||
72 | dnl Checks for typedefs, structures, and compiler characteristics. | ||
73 | gl_INIT | ||
74 | |||
75 | AC_C_CONST | ||
76 | AC_C_INLINE | ||
77 | AC_TYPE_PID_T | ||
78 | AC_TYPE_OFF_T | ||
79 | AC_TYPE_SIZE_T | ||
80 | AC_HEADER_TIME | ||
81 | AC_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 | |||
95 | dnl Checks for library functions. | ||
96 | AC_TYPE_SIGNAL | ||
97 | AC_CHECK_FUNCS(gethostname select socket strdup strerror strtol \ | ||
98 | setegid setregid setresgid seteuid setreuid \ | ||
99 | sysconf getdtablesize) | ||
100 | |||
101 | # Crypt | ||
102 | AC_CHECK_DECLS(crypt,,,[ | ||
103 | #include <unistd.h> | ||
104 | #ifdef HAVE_CRYPT_H | ||
105 | # include <crypt.h> | ||
106 | #endif]) | ||
107 | AH_BOTTOM([ | ||
108 | #if !HAVE_DECL_CRYPT | ||
109 | char *crypt(const char *key, const char *salt); | ||
110 | #endif]) | ||
111 | |||
112 | AC_CHECK_LIB(crypt, crypt) | ||
113 | |||
114 | # Gettext. | ||
115 | AM_ICONV | ||
116 | AM_GNU_GETTEXT([external], [need-formatstring-macros]) | ||
117 | AM_GNU_GETTEXT_VERSION([0.18]) | ||
118 | AC_CONFIG_LINKS(include/gettext.h:gnu/gettext.h) | ||
119 | |||
120 | # Check for zlib | ||
121 | AC_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 | |||
127 | LOG_FACILITY="LOG_DAEMON" | ||
128 | |||
129 | AC_ARG_VAR([LOG_FACILITY], | ||
130 | [Default syslog facility]) | ||
131 | if 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 | ||
140 | fi | ||
141 | AC_DEFINE_UNQUOTED([LOG_FACILITY],$LOG_FACILITY, | ||
142 | [Default syslog facility.]) | ||
143 | |||
144 | AC_ARG_VAR([DEFAULT_DICT_SERVER], | ||
145 | [Set the name of the default DICT server for dico utility]) | ||
146 | if test -z "$DEFAULT_DICT_SERVER" ; then | ||
147 | DEFAULT_DICT_SERVER="gnu.org.ua" | ||
148 | fi | ||
149 | |||
150 | AC_ARG_VAR([DEFAULT_INCLUDE_DIR], | ||
151 | [Default preprocessor include directory]) | ||
152 | if test -z "$DEFAULT_INCLUDE_DIR"; then | ||
153 | DEFAULT_INCLUDE_DIR='$(pkgdatadir)/include' | ||
154 | fi | ||
155 | AC_ARG_VAR([DEFAULT_VERSION_INCLUDE_DIR], | ||
156 | [Default version-specific include directory]) | ||
157 | if test -z "$DEFAULT_VERSION_INCLUDE_DIR"; then | ||
158 | DEFAULT_VERSION_INCLUDE_DIR='$(pkgdatadir)/$(VERSION)/include' | ||
159 | fi | ||
160 | |||
161 | # Grecs configuration system | ||
162 | GRECS_SETUP(grecs, [shared tests getopt git2chg std-pp-setup sockaddr-list]) | ||
163 | GRECS_HOST_PROJECT_INCLUDES='-I$(top_srcdir)/gnu -I$(top_builddir)/gnu' | ||
164 | |||
165 | # Tcl/tk | ||
166 | AC_ARG_WITH([tk], | ||
167 | AC_HELP_STRING([--with-tk], | ||
168 | [build Tcl/Tk-based applications (GCIDER)]), | ||
169 | [ | ||
170 | case "${withval}" in | ||
171 | yes) status_tk=yes ;; | ||
172 | no) status_tk=no;; | ||
173 | *) AC_MSG_ERROR([bad value ${withval} for --with-tk]) | ||
174 | esac],[status_tk=yes]) | ||
175 | |||
176 | if 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]) | ||
182 | fi | ||
183 | # | ||
184 | AC_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"]) | ||
193 | if 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]) | ||
196 | else | ||
197 | AC_DEFINE_UNQUOTED(DEFAULT_AUTOLOGIN_FILE, NULL, | ||
198 | [Define to the name of a netrc-style autologin file]) | ||
199 | fi | ||
200 | |||
201 | AC_ARG_WITH([readline], | ||
202 | AC_HELP_STRING([--without-readline], | ||
203 | [do not use readline]), | ||
204 | [ | ||
205 | case "${withval}" in | ||
206 | yes) status_readline=yes ;; | ||
207 | no) status_readline=no ;; | ||
208 | *) AC_MSG_ERROR(bad value ${withval} for --without-readline) ;; | ||
209 | esac],[status_readline=yes]) | ||
210 | |||
211 | # Test for GNU Readline | ||
212 | AC_SUBST(READLINE_LIBS) | ||
213 | |||
214 | if 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 | ||
246 | fi | ||
247 | |||
248 | AH_BOTTOM([ | ||
249 | /* Some older versions of readline have completion_matches */ | ||
250 | #ifndef HAVE_RL_COMPLETION_MATCHES | ||
251 | # define rl_completion_matches com |