]> jfr.im git - irc/weechat/weechat.git/blob - configure.ac
[WIP] javascript: add compatibility with v8 version 6.8
[irc/weechat/weechat.git] / configure.ac
1 #
2 # Copyright (C) 2003-2021 Sébastien Helleu <flashcode@flashtux.org>
3 # Copyright (C) 2005 Benoit Papillault <benoit.papillault@free.fr>
4 # Copyright (C) 2005-2006 Julien Louis <ptitlouis@sysif.net>
5 # Copyright (C) 2005-2009 Emmanuel Bouthenot <kolter@openics.org>
6 #
7 # This file is part of WeeChat, the extensible chat client.
8 #
9 # WeeChat is free software; you can redistribute it and/or modify
10 # it under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3 of the License, or
12 # (at your option) any later version.
13 #
14 # WeeChat is distributed in the hope that it will be useful,
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 # GNU General Public License for more details.
18 #
19 # You should have received a copy of the GNU General Public License
20 # along with WeeChat. If not, see <https://www.gnu.org/licenses/>.
21 #
22
23 # -*- Autoconf -*-
24 # Process this file with autoconf to produce a configure script.
25
26 AC_PREREQ(2.56)
27 AC_INIT(WeeChat, m4_esyscmd([./version.sh devel-full | tr -d '\n']), flashcode@flashtux.org)
28 AC_CONFIG_SRCDIR([configure.ac])
29 AM_CONFIG_HEADER(config.h)
30 AM_INIT_AUTOMAKE([foreign])
31 LICENSE="GPL3"
32
33 # Checks for programs
34 AC_PROG_CC
35 AC_PROG_CXX
36 AC_PROG_MAKE_SET
37 AC_GNU_SOURCE
38 AC_PROG_LN_S
39 AM_PROG_LIBTOOL
40 PKG_PROG_PKG_CONFIG
41
42 # Files to generate
43 AC_CONFIG_FILES([weechat.pc])
44 AC_CONFIG_FILES([weechat-${VERSION}-1.cygport:weechat.cygport.in])
45
46 # Add some flags for some OS
47 case "$host_os" in
48 freebsd* | openbsd*)
49 CFLAGS="$CFLAGS -I/usr/local/include"
50 CXXFLAGS="$CXXFLAGS -I/usr/local/include"
51 LDFLAGS="$LDFLAGS -L/usr/local/lib"
52 ;;
53 netbsd*)
54 CFLAGS="$CFLAGS -I/usr/pkg/include"
55 CXXFLAGS="$CXXFLAGS -I/usr/pkg/include"
56 LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
57 ;;
58 solaris*)
59 LDFLAGS="$LDFLAGS -lsocket -lxnet"
60 ;;
61 darwin*)
62 LDFLAGS="$LDFLAGS -lresolv"
63 ;;
64 esac
65
66 # Gettext
67 ALL_LINGUAS="cs de es fr hu it ja pl pt pt_BR ru tr"
68 AM_GNU_GETTEXT
69 AM_GNU_GETTEXT_VERSION([0.18])
70
71 # Checks for libraries
72 AC_CHECK_LIB(ncurses, initscr, LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
73 AC_CHECK_LIB(ncursesw, initscr, LIBNCURSESW_FOUND=1, LIBNCURSESW_FOUND=0)
74
75 # Checks for header files
76 AC_HEADER_STDC
77 AC_CHECK_HEADERS([libintl.h sys/resource.h])
78
79 # Checks for typedefs, structures, and compiler characteristics
80 AC_HEADER_TIME
81 AC_STRUCT_TM
82
83 AC_MSG_CHECKING([for socklen_t])
84 AC_CACHE_VAL(ac_cv_type_socklen_t,
85 [AC_LINK_IFELSE([AC_LANG_PROGRAM(
86 [[ #include <sys/types.h>
87 #include <sys/socket.h> ]],
88 [[ socklen_t t; ]])],
89 [ ac_cv_type_socklen_t=yes ],
90 [ ac_cv_type_socklen_t=no ],
91 )])
92 if test $ac_cv_type_socklen_t = no; then
93 AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
94 fi
95 AC_MSG_RESULT($ac_cv_type_socklen_t)
96
97 # Checks for library functions.
98 AC_FUNC_SELECT_ARGTYPES
99 AC_TYPE_SIGNAL
100 AC_CHECK_FUNCS([mallinfo])
101
102 # Variables in config.h
103
104 AH_VERBATIM([PREFIX], [#undef PREFIX])
105 AH_VERBATIM([WEECHAT_LIBDIR], [#undef WEECHAT_LIBDIR])
106 AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR])
107 AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
108 AH_VERBATIM([HAVE_EAT_NEWLINE_GLITCH], [#undef HAVE_EAT_NEWLINE_GLITCH])
109 AH_VERBATIM([HAVE_ASPELL_VERSION_STRING], [#undef HAVE_ASPELL_VERSION_STRING])
110 AH_VERBATIM([HAVE_ENCHANT_GET_VERSION], [#undef HAVE_ENCHANT_GET_VERSION])
111 AH_VERBATIM([HAVE_GUILE_GMP_MEMORY_FUNCTIONS], [#undef HAVE_GUILE_GMP_MEMORY_FUNCTIONS])
112 AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS])
113 AH_VERBATIM([PLUGIN_BUFLIST], [#undef PLUGIN_BUFLIST])
114 AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
115 AH_VERBATIM([PLUGIN_EXEC], [#undef PLUGIN_EXEC])
116 AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO])
117 AH_VERBATIM([PLUGIN_FSET], [#undef PLUGIN_FSET])
118 AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC])
119 AH_VERBATIM([PLUGIN_LOGGER], [#undef PLUGIN_LOGGER])
120 AH_VERBATIM([PLUGIN_RELAY], [#undef PLUGIN_RELAY])
121 AH_VERBATIM([PLUGIN_SCRIPT], [#undef PLUGIN_SCRIPT])
122 AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
123 AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
124 AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
125 AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
126 AH_VERBATIM([PLUGIN_PHP], [#undef PLUGIN_PHP])
127 AH_VERBATIM([PLUGIN_TCL], [#undef PLUGIN_TCL])
128 AH_VERBATIM([PLUGIN_GUILE], [#undef PLUGIN_GUILE])
129 AH_VERBATIM([PLUGIN_JAVASCRIPT], [#undef PLUGIN_JAVASCRIPT])
130 AH_VERBATIM([PLUGIN_SPELL], [#undef PLUGIN_SPELL])
131 AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER])
132 AH_VERBATIM([PLUGIN_XFER], [#undef PLUGIN_XFER])
133 AH_VERBATIM([TESTS], [#undef TESTS])
134 AH_VERBATIM([MAN], [#undef MAN])
135 AH_VERBATIM([DOC], [#undef DOC])
136 AH_VERBATIM([WEECHAT_HOME], [#define WEECHAT_HOME "~/.weechat"])
137 AH_VERBATIM([CA_FILE], [#define CA_FILE "/etc/ssl/certs/ca-certificates.crt"])
138
139 # Arguments for ./configure
140
141 AC_ARG_ENABLE(ncurses, [ --disable-ncurses turn off ncurses interface (default=compiled if found)],enable_ncurses=$enableval,enable_ncurses=yes)
142 AC_ARG_ENABLE(headless, [ --disable-headless turn off headless binary (default=compiled), this is required for tests],enable_headless=$enableval,enable_headless=yes)
143 AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes)
144 AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes)
145 AC_ARG_ENABLE(buflist, [ --disable-buflist turn off Buflist plugin (default=compiled)],enable_buflist=$enableval,enable_buflist=yes)
146 AC_ARG_ENABLE(charset, [ --disable-charset turn off Charset plugin (default=compiled)],enable_charset=$enableval,enable_charset=yes)
147 AC_ARG_ENABLE(exec, [ --disable-exec turn off Exec plugin (default=compiled)],enable_exec=$enableval,enable_exec=yes)
148 AC_ARG_ENABLE(fifo, [ --disable-fifo turn off Fifo plugin (default=compiled)],enable_fifo=$enableval,enable_fifo=yes)
149 AC_ARG_ENABLE(fset, [ --disable-fset turn off Fast Set plugin (default=compiled)],enable_fset=$enableval,enable_fset=yes)
150 AC_ARG_ENABLE(irc, [ --disable-irc turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes)
151 AC_ARG_ENABLE(logger, [ --disable-logger turn off Logger plugin (default=compiled)],enable_logger=$enableval,enable_logger=yes)
152 AC_ARG_ENABLE(relay, [ --disable-relay turn off Relay plugin (default=compiled)],enable_relay=$enableval,enable_relay=yes)
153 AC_ARG_ENABLE(script, [ --disable-script turn off Script plugin (default=compiled)],enable_script=$enableval,enable_script=yes)
154 AC_ARG_ENABLE(scripts, [ --disable-scripts turn off script plugins (perl, python, ...) (default=compiled if found)],enable_scripts=$enableval,enable_scripts=yes)
155 AC_ARG_ENABLE(perl, [ --disable-perl turn off Perl script plugin (default=compiled if found)],enable_perl=$enableval,enable_perl=yes)
156 AC_ARG_ENABLE(python, [ --disable-python turn off Python script plugin (default=compiled if found)],enable_python=$enableval,enable_python=yes)
157 AC_ARG_ENABLE(python2, [ --enable-python2 use Python 2 instead of Python 3 (default=off)],enable_python2=$enableval,enable_python2=no)
158 AC_ARG_ENABLE(ruby, [ --disable-ruby turn off Ruby script plugin (default=compiled if found)],enable_ruby=$enableval,enable_ruby=yes)
159 AC_ARG_ENABLE(lua, [ --disable-lua turn off Lua script plugin (default=compiled if found)],enable_lua=$enableval,enable_lua=yes)
160 AC_ARG_ENABLE(tcl, [ --disable-tcl turn off Tcl script plugin (default=compiled if found)],enable_tcl=$enableval,enable_tcl=yes)
161 AC_ARG_ENABLE(guile, [ --disable-guile turn off Guile (scheme) script plugin (default=compiled if found)],enable_guile=$enableval,enable_guile=yes)
162 AC_ARG_ENABLE(javascript, [ --enable-javascript turn on JavaScript script plugin (default=off)],enable_javascript=$enableval,enable_javascript=no)
163 AC_ARG_ENABLE(php, [ --disable-php turn off PHP script plugin (default=compiled if found)],enable_php=$enableval,enable_php=yes)
164 AC_ARG_ENABLE(spell, [ --disable-spell turn off Spell checker plugin (default=compiled)],enable_spell=$enableval,enable_spell=yes)
165 AC_ARG_ENABLE(enchant, [ --enable-enchant turn on Enchant lib for Spell checker plugin (default=off)],enable_enchant=$enableval,enable_enchant=no)
166 AC_ARG_ENABLE(trigger, [ --disable-trigger turn off Trigger plugin (default=compiled)],enable_trigger=$enableval,enable_trigger=yes)
167 AC_ARG_ENABLE(xfer, [ --disable-xfer turn off Xfer (file transfer) plugin (default=compiled)],enable_xfer=$enableval,enable_xfer=yes)
168 AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tcl configuration (tclConfig.sh)],tclconfig=$withval,tclconfig='')
169 AC_ARG_WITH(debug, [ --with-debug debugging: 0=no debug, 1=debug compilation (default=0)],debug=$withval,debug=0)
170 AC_ARG_ENABLE(tests, [ --enable-tests turn on build of tests (default=not built)],enable_tests=$enableval,enable_tests=no)
171 AC_ARG_ENABLE(man, [ --enable-man turn on build of man page (default=not built)],enable_man=$enableval,enable_man=no)
172 AC_ARG_ENABLE(doc, [ --enable-doc turn on build of documentation (default=not built)],enable_doc=$enableval,enable_doc=no)
173
174 AC_ARG_VAR(WEECHAT_HOME, [WeeChat home directory for config, logs, scripts.. (default is "~/.weechat")])
175 AC_ARG_VAR(CA_FILE, [File containing the certificate authorities (default is "/etc/ssl/certs/ca-certificates.crt"). This is the default value of option "weechat.network.gnutls_ca_file".])
176
177 if test "x$WEECHAT_HOME" = "x" ; then
178 WEECHAT_HOME="~/.weechat"
179 fi
180 AC_DEFINE_UNQUOTED(WEECHAT_HOME, "$WEECHAT_HOME")
181
182 if test "x$CA_FILE" = "x" ; then
183 CA_FILE="/etc/ssl/certs/ca-certificates.crt"
184 fi
185 AC_DEFINE_UNQUOTED(CA_FILE, "$CA_FILE")
186
187 not_asked=""
188 not_found=""
189
190 if test "x$enable_headless" != "xyes" && test "x$enable_tests" = "xyes"; then
191 AC_MSG_ERROR([*** Headless mode is required for tests.])
192 fi
193
194 # ------------------------------------------------------------------------------
195 # pkg-config
196 # ------------------------------------------------------------------------------
197
198 PKGCONFIG=""
199 AC_CHECK_PROGS(PKGCONFIG, pkg-config)
200 if test "x$PKGCONFIG" = "x"; then
201 AC_MSG_ERROR([
202 *** "pkg-config" couldn't be found on your system.
203 *** Try to install it with your software package manager.])
204 fi
205
206 # ------------------------------------------------------------------------------
207 # dynamic loader
208 # ------------------------------------------------------------------------------
209
210 PLUGINS_LFLAGS=
211
212 AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
213 if test "$LIBDL_FOUND" != "yes"; then
214 AC_CHECK_LIB(dl, dlopen, [LIBDL_FOUND=yes; PLUGINS_LFLAGS=-ldl], LIBDL_FOUND=no)
215 fi
216 if test "$LIBDL_FOUND" != "yes"; then
217 AC_MSG_ERROR([
218 *** "dl" library (dynamic library loader) couldn't be found on your system.
219 *** Try to install it with your software package manager.])
220 fi
221 AC_SUBST(PLUGINS_LFLAGS)
222
223 # ------------------------------------------------------------------------------
224 # gui
225 # ------------------------------------------------------------------------------
226
227 if test "x$enable_ncurses" = "xyes" ; then
228 if test "$LIBNCURSESW_FOUND" = "0" ; then
229 if test "$LIBNCURSES_FOUND" = "0" ; then
230 AC_MSG_WARN([
231 *** ncurses library not found!
232 *** WeeChat will be built without ncurses support.])
233 enable_ncurses="no"
234 not_found="$not_found ncurses"
235 else
236 AC_MSG_WARN([
237 *** ncursesw library not found! Falling back to "ncurses"
238 *** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
239 NCURSES_LFLAGS="-lncurses"
240 fi
241 else
242 NCURSES_LFLAGS="-lncursesw"
243 fi
244 AC_CHECK_HEADERS([ncurses.h ncursesw/curses.h])
245 AC_SUBST(NCURSES_LFLAGS)
246 else
247 not_asked="$not_asked ncurses"
248 fi
249
250 # ------------------------------------------------------------------------------
251 # headless
252 # ------------------------------------------------------------------------------
253
254 if test "x$enable_headless" != "xyes" ; then
255 not_asked="$not_asked headless"
256 fi
257
258 # ------------------------------------------------------------------------------
259 # iconv
260 # ------------------------------------------------------------------------------
261
262 ICONV_LFLAGS=""
263
264 iconv_found="no"
265 AC_CHECK_HEADER(iconv.h,ac_found_iconv_header="yes",ac_found_iconv_header="no")
266 if test "x$ac_found_iconv_header" = "xyes" ; then
267 AC_CHECK_LIB(iconv,iconv_open,ac_found_iconv_lib="yes",ac_found_iconv_lib="no")
268 if test "x$ac_found_iconv_lib" = "xno" ; then
269 AC_CHECK_LIB(iconv,libiconv_open,ac_found_iconv_lib="yes",ac_found_iconv_lib="no")
270 fi
271 if test "x$ac_found_iconv_lib" = "xyes" ; then
272 ICONV_LFLAGS="-liconv"
273 LIBS="$LIBS $ICONV_LFLAGS"
274 fi
275 AC_MSG_CHECKING(for iconv usability in programs)
276 AC_TRY_RUN([
277 #include <iconv.h>
278 int main(int argc, char **argv) {
279 iconv_t conv = iconv_open("ISO8859-1", "UTF-8");
280 if (conv != (iconv_t) -1) {
281 return 0;
282 }
283 return 1;
284 }],iconv_found="yes", iconv_found="no", iconv_found="assume-yes")
285 if test "x$iconv_found" = "xno" ; then
286 AC_MSG_RESULT(no)
287 else
288 AC_MSG_RESULT(yes)
289 fi
290 fi
291
292 if test "x$iconv_found" = "xno" ; then
293 AC_MSG_ERROR([
294 *** Iconv headers and/or libraries couldn't be found on your system.
295 *** Try to install them with your software package manager.
296 *** WeeChat can't be built without Iconv support.])
297 fi
298
299 # ------------------------------------------------------------------------------
300 # plugins
301 # ------------------------------------------------------------------------------
302
303 if test "x$enable_scripts" = "xno" ; then
304 enable_perl="no"
305 enable_python="no"
306 enable_ruby="no"
307 enable_lua="no"
308 enable_tcl="no"
309 enable_guile="no"
310 enable_javascript="no"
311 enable_php="no"
312 fi
313
314 # ---------------------------------- alias -------------------------------------
315
316 if test "x$enable_alias" = "xyes" ; then
317 ALIAS_CFLAGS=""
318 ALIAS_LFLAGS=""
319 AC_SUBST(ALIAS_CFLAGS)
320 AC_SUBST(ALIAS_LFLAGS)
321 AC_DEFINE(PLUGIN_ALIAS)
322 else
323 not_asked="$not_asked alias"
324 fi
325
326 # --------------------------------- buflist ------------------------------------
327
328 if test "x$enable_buflist" = "xyes" ; then
329 AC_DEFINE(PLUGIN_BUFLIST)
330 else
331 not_asked="$not_asked buflist"
332 fi
333
334 # --------------------------------- charset ------------------------------------
335
336 if test "x$enable_charset" = "xyes" ; then
337 CHARSET_CFLAGS=""
338 CHARSET_LFLAGS="$ICONV_LFLAGS"
339 AC_SUBST(CHARSET_CFLAGS)
340 AC_SUBST(CHARSET_LFLAGS)
341 AC_DEFINE(PLUGIN_CHARSET)
342 else
343 not_asked="$not_asked charset"
344 fi
345
346 # ---------------------------------- exec --------------------------------------
347
348 if test "x$enable_exec" = "xyes" ; then
349 EXEC_CFLAGS=""
350 EXEC_LFLAGS=""
351 AC_SUBST(EXEC_CFLAGS)
352 AC_SUBST(EXEC_LFLAGS)
353 AC_DEFINE(PLUGIN_EXEC)
354 else
355 not_asked="$not_asked exec"
356 fi
357
358 # ---------------------------------- fifo --------------------------------------
359
360 if test "x$enable_fifo" = "xyes" ; then
361 FIFO_CFLAGS=""
362 FIFO_LFLAGS=""
363 AC_SUBST(FIFO_CFLAGS)
364 AC_SUBST(FIFO_LFLAGS)
365 AC_DEFINE(PLUGIN_FIFO)
366 else
367 not_asked="$not_asked fifo"
368 fi
369
370 # --------------------------------- fset ---------------------------------------
371
372 if test "x$enable_fset" = "xyes" ; then
373 AC_DEFINE(PLUGIN_FSET)
374 else
375 not_asked="$not_asked fset"
376 fi
377
378 # ----------------------------------- irc --------------------------------------
379
380 if test "x$enable_irc" = "xyes" ; then
381 AC_DEFINE(PLUGIN_IRC)
382 else
383 not_asked="$not_asked irc"
384 fi
385
386 # --------------------------------- logger -------------------------------------
387
388 if test "x$enable_logger" = "xyes" ; then
389 LOGGER_CFLAGS=""
390 LOGGER_LFLAGS=""
391 AC_SUBST(LOGGER_CFLAGS)
392 AC_SUBST(LOGGER_LFLAGS)
393 AC_DEFINE(PLUGIN_LOGGER)
394 else
395 not_asked="$not_asked logger"
396 fi
397
398 # --------------------------------- relay --------------------------------------
399
400 if test "x$enable_relay" = "xyes" ; then
401 RELAY_CFLAGS=""
402 RELAY_LFLAGS=""
403 AC_SUBST(RELAY_CFLAGS)
404 AC_SUBST(RELAY_LFLAGS)
405 AC_DEFINE(PLUGIN_RELAY)
406 else
407 not_asked="$not_asked relay"
408 fi
409
410 # --------------------------------- script -------------------------------------
411
412 if test "x$enable_script" = "xyes" ; then
413 AC_DEFINE(PLUGIN_SCRIPT)
414 else
415 not_asked="$not_asked script"
416 fi
417
418 # ---------------------------------- perl --------------------------------------
419
420 PERL_VERSION=
421
422 if test "x$enable_perl" = "xyes" ; then
423 AC_PATH_PROGS(PERL, perl perl5)
424 if test -z $PERL ; then
425 AC_MSG_WARN([
426 *** Perl must be installed on your system but perl interpreter couldn't be found in path.
427 *** Please check that perl is in path, or install it with your software package manager.
428 *** WeeChat will be built without Perl support.])
429 enable_perl="no"
430 not_found="$not_found perl"
431 else
432 PERL_VERSION=`perl -V:version | sed "s/version='\(.*\)';/\1/"`
433 AC_MSG_CHECKING(for Perl headers files)
434
435 PERL_HEADER_TEST=`PT=perltest.c ; echo "#include <EXTERN.h>" > $PT; echo "#include <perl.h>" >> $PT; echo "#include <XSUB.h>" >> $PT ; echo "int main() { return 0; }" >> $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ccopts -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
436
437 if test "x$PERL_HEADER_TEST" = "x0" ; then
438 PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
439 AC_MSG_RESULT(found)
440 AC_MSG_CHECKING(for Perl library)
441 PERL_LIB_TEST=`PT=perltest.c ; echo "int main() { return 0; }" > $PT ; $CC -Wall $PT -o $PT.out $($PERL -MExtUtils::Embed -e ldopts) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
442 if test "x$PERL_LIB_TEST" = "x0" ; then
443 PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
444 AC_MSG_RESULT(found)
445 else
446 AC_MSG_WARN([
447 *** Perl library couldn't be found on your system.
448 *** Try to install it with your software package manager.
449 *** WeeChat will be built without Perl support.])
450 enable_perl="no"
451 not_found="$not_found perl"
452 fi
453 else
454 AC_MSG_WARN([
455 *** Perl headers couldn't be found on your system.
456 *** Try to install it with your software package manager.
457 *** WeeChat will be built without Perl support.])
458 enable_perl="no"
459 not_found="$not_found perl"
460 fi
461 fi
462 else
463 not_asked="$not_asked perl"
464 fi
465
466 if test "x$enable_perl" = "xyes" ; then
467 AC_SUBST(PERL_CFLAGS)
468 AC_SUBST(PERL_LFLAGS)
469 AC_DEFINE(PLUGIN_PERL)
470 fi
471
472 # --------------------------------- python -------------------------------------
473
474 PYTHON_VERSION=
475
476 if test "x$enable_python" = "xyes" ; then
477 if test "x$enable_python2" = "xyes" ; then
478 PKG_CHECK_MODULES(PYTHON, [python2], [PYTHON_FOUND=yes; PYTHON_VERSION=`$PKGCONFIG --modversion python2`], [PYTHON_FOUND=no])
479 else
480 PKG_CHECK_MODULES(PYTHON, [python3-embed], [PYTHON_FOUND=yes; PYTHON_VERSION=`$PKGCONFIG --modversion python3-embed`], [PYTHON_FOUND=no])
481 if test "x$PYTHON_FOUND" != "xyes"; then
482 PKG_CHECK_MODULES(PYTHON, [python3], [PYTHON_FOUND=yes; PYTHON_VERSION=`$PKGCONFIG --modversion python3`], [PYTHON_FOUND=no])
483 fi
484 fi
485 if test "x$PYTHON_FOUND" != "xyes" ; then
486 AC_MSG_WARN([
487 *** Python must be installed on your system but python interpreter couldn't be found in path.
488 *** Please check that python is in path, or install it with your software package manager.
489 *** WeeChat will be built without Python support.])
490 enable_python="no"
491 not_found="$not_found python"
492 fi
493 else
494 not_asked="$not_asked python"
495 fi
496
497 if test "x$enable_python" = "xyes" ; then
498 AC_SUBST(PYTHON_CFLAGS)
499 AC_SUBST(PYTHON_LIBS)
500 AC_SUBST(PYTHON_VERSION)
501 AC_DEFINE(PLUGIN_PYTHON)
502 fi
503
504 # ---------------------------------- ruby --------------------------------------
505
506 RUBY_VERSION=
507
508 if test "x$enable_ruby" = "xyes" ; then
509 RUBY_CFLAGS=""
510 RUBY_LFLAGS=""
511 for v in "2.7" "2.6" "2.5" "2.4" "2.3" "2.2" "2.1" "2.0" "1.9" "1.8" ; do
512 pkgconfig_ruby_found=`$PKGCONFIG --exists ruby-$v 2>/dev/null`
513 if test "x$?" = "x0" ; then
514 RUBY_VERSION=`$PKGCONFIG --modversion ruby-$v`
515 RUBY_CFLAGS=`$PKGCONFIG --cflags ruby-$v`
516 RUBY_LFLAGS=`$PKGCONFIG --libs ruby-$v`
517 break
518 fi
519 done
520
521 # detect old Ruby versions
522 if test "x$RUBY_CFLAGS" = "x" -o "x$RUBY_LFLAGS" = "x" ; then
523 AC_PATH_PROGS(RUBY, ruby1.9.3 ruby1.9.2 ruby1.9.1 ruby1.9 ruby)
524 if test -z $RUBY ; then
525 AC_MSG_WARN([
526 *** Ruby must be installed on your system but ruby interpreter couldn't be found in path.
527 *** Please check that ruby is in path, or install it with your software package manager.
528 *** WeeChat will be built without Ruby support.])
529 enable_ruby="no"
530 not_found="$not_found ruby"
531 else
532 RUBY_VERSION=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG[['MAJOR']] + '.' + RbConfig::CONFIG[['MINOR']] + '.' + RbConfig::CONFIG[['TEENY']]"`
533 RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG[['rubyhdrdir']] || RbConfig::CONFIG[['archdir']]"`
534 RUBY_ARCH=`$RUBY -rrbconfig -e 'print RbConfig::CONFIG[["arch"]]'`
535 AC_MSG_CHECKING(for Ruby header files)
536 if test -d "$RUBY_INCLUDE/"; then
537 RUBY_CFLAGS="-I$RUBY_INCLUDE/ -I$RUBY_INCLUDE/$RUBY_ARCH"
538 else
539 AC_MSG_WARN([
540 *** Ruby header files couldn't be found on your system.
541 *** Try to install them with your software package manager.
542 *** WeeChat will be built without Ruby support.])
543 enable_ruby="no"
544 not_found="$not_found ruby"
545 fi
546 AC_MSG_RESULT(found)
547 RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts RbConfig::CONFIG[['LIBRUBYARG_SHARED']]"`
548 fi
549 fi
550 else
551 not_asked="$not_asked ruby"
552 fi
553
554 if test "x$enable_ruby" = "xyes" ; then
555 AC_SUBST(RUBY_CFLAGS)
556 AC_SUBST(RUBY_LFLAGS)
557 AC_DEFINE(PLUGIN_RUBY)
558 fi
559
560 # ---------------------------------- lua --------------------------------------
561
562 LUA_VERSION=
563
564 if test "x$enable_lua" = "xyes" ; then
565 ac_save_CXXFLAGS="$CXXFLAGS"
566 ac_save_CFLAGS="$CFLAGS"
567 ac_save_LDFLAGS="$LDFLAGS"
568
569 LUA_CFLAGS=""
570 LUA_LFLAGS=""
571
572 if test -n "$lua_inc"; then
573 CFLAGS="$CFLAGS -I$lua_inc"
574 CXXFLAGS="$CXXFLAGS -I$lua_inc"
575 fi
576 if test -n "$lua_lib"; then
577 LDFLAGS="$LDFLAGS -L$lua_lib"
578 fi
579
580 if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
581 AC_MSG_CHECKING(for Lua headers and libraries with pkg-config)
582 echo
583 for l in "53" "5.3" "52" "5.2" "51" "5.1" "50" "5.0" "$lua_suffix" "" ; do
584 pkgconfig_lua_found=`$PKGCONFIG --exists lua$l 2>/dev/null`
585 if test "x$?" = "x0" ; then
586 LUA_VERSION=`$PKGCONFIG --modversion lua$l`
587 LUA_CFLAGS="$LUA_CFLAGS "`$PKGCONFIG --cflags lua$l`
588 LUA_LFLAGS="$LUA_LFLAGS "`$PKGCONFIG --libs lua$l`
589
590 pkgconfig_lualib_found=`$PKGCONFIG --exists lualib$l 2>/dev/null`
591 if test "x$?" = "x0"; then
592 LUA_CFLAGS="$LUA_CFLAGS "`$PKGCONFIG --cflags lualib$l`
593 LUA_LFLAGS="$LUA_LFLAGS "`$PKGCONFIG --libs lualib$l`
594 fi
595 break
596 fi
597 done
598 fi
599
600 if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
601 LUACONFIG=""
602 AC_CHECK_PROGS(LUACONFIG, lua-config53 lua-config5.3 lua-config52 lua-config5.2 lua-config51 lua-config5.1 lua-config50 lua-config5.0 lua-config)
603 if test "x$LUACONFIG" != "x" ; then
604 AC_MSG_CHECKING(for Lua headers and libraries with lua-config)
605 echo
606 LUA_CFLAGS=`$LUACONFIG --include`
607 LUA_LFLAGS=`$LUACONFIG --libs`
608 LUA_VERSION="5.0.x"
609 fi
610 fi
611
612 if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
613 AC_MSG_CHECKING(for Lua headers and libraries)
614 echo
615 AC_CHECK_HEADER(lua.h,ac_found_lua_header="yes",ac_found_lua_header="no")
616 AC_CHECK_HEADER(lualib.h,ac_found_liblua_header="yes",ac_found_liblua_header="no")
617 if test "x$ac_found_lua_header" = "xyes" -a "x$ac_found_liblua_header" = "xyes"; then
618 LUA_CFLAGS="$CFLAGS"
619 fi
620 for l in "53" "5.3" "52" "5.2" "51" "5.1" "50" "5.0" "$lua_suffix" "" ; do
621 AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
622 if test "x$ac_found_lua_lib" = "xyes" ; then
623 LUA_VERSION=">=5.1.0"
624
625 LUA_LFLAGS="$LDFLAGS -llua$l -lm"
626
627 ac2_save_LDFLAGS="$LDFLAGS"
628 LDFLAGS="$LDFLAGS -llua$l -lm"
629
630 if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
631 LDFLAGS="$LDFLAGS -ldl"
632 fi
633
634 AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
635 if test "x$ac_found_liblua_lib" = "xyes" ; then
636 LUA_VERSION="5.0.x"
637
638 LUA_LFLAGS="$LUA_LFLAGS -llualib$l"
639
640 if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
641 LUA_LFLAGS="$LUA_LFLAGS -ldl"
642 fi
643 fi
644
645 LDFLAGS="$ac2_save_LDFLAGS"
646 break
647 fi
648 done
649 fi
650
651 AC_MSG_CHECKING(for Lua compiling and linking)
652 LUA_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT; echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)lua_open()); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_CFLAGS $LUA_LFLAGS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
653 if test "x$LUA_TEST" != "x0" ; then
654 LUA52_TEST=`LT=luatest.c ; echo "#include <lua.h>" > $LT; echo "#include <lualib.h>" >> $LT; echo "int main() { luaopen_base((lua_State *)luaL_newstate()); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $LUA_CFLAGS $LUA_LFLAGS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
655 if test "x$LUA52_TEST" != "x0" ; then
656 AC_MSG_RESULT(no)
657 AC_MSG_WARN([
658 *** Lua (>=5.0) headers and/or libraries couldn't be found on your system.
659 *** Try to install liblua, liblualib and liblua-dev with your software package manager.
660 *** WeeChat will be built without Lua support.])
661 enable_lua="no"
662 not_found="$not_found lua"
663 else
664 AC_MSG_RESULT(yes)
665 fi
666 else
667 AC_MSG_RESULT(yes)
668 fi
669
670 CFLAGS="$ac_save_CFLAGS"
671 CXXFLAGS="$ac_save_CXXFLAGS"
672 LDFLAGS="$ac_save_LDFLAGS"
673 else
674 not_asked="$not_asked lua"
675 fi
676
677 if test "x$enable_lua" = "xyes" ; then
678 AC_SUBST(LUA_CFLAGS)
679 AC_SUBST(LUA_LFLAGS)
680 AC_DEFINE(PLUGIN_LUA)
681 fi
682
683 # --------------------------------- tcl -------------------------------------
684
685 TCL_VERSION=
686
687 if test "x$enable_tcl" = "xyes" ; then
688 enable_plugins="yes"
689
690 AC_MSG_CHECKING(for tclConfig.sh)
691 tcl_found="no"
692 tcl_dirs="/usr/lib/tcl8.6 /usr/lib64/tcl8.6 /usr/lib/tcl8.5 /usr/lib64/tcl8.5 /lib /lib64 /usr/lib /usr/lib64 /usr/tcl/lib /usr/tcl/lib64 /usr/local/tcl-8.6/lib /usr/local/tcl-8.6/lib64 /usr/local/tcl-8.5/lib /usr/local/tcl-8.5/lib64 /usr/local/lib /usr/local/lib64 /usr/local/tcl/lib /usr/local/tcl/lib64 /opt/lib /opt/lib64"
693 if test "x$tclconfig" != "x" ; then
694 tcl_dirs="${tclconfig} ${tcl_dirs}"
695 fi
696 for tcl_dir in $tcl_dirs ; do
697 if test -f ${tcl_dir}/tclConfig.sh ; then
698 . ${tcl_dir}/tclConfig.sh
699 TCL_CFLAGS="-I${TCL_PREFIX}/include $TCL_INCLUDE_SPEC"
700 TCL_LFLAGS="$TCL_LIB_SPEC $TCL_LIBS"
701 tcl_found="yes"
702 AC_MSG_RESULT(${tcl_dir}/tclConfig.sh)
703 break
704 fi
705 done
706 if test "x$tcl_found" = "xno" ; then
707 AC_MSG_WARN([
708 *** Script tclConfig.sh couldn't be found on your system.
709 *** WeeChat will be built without Tcl support.])
710 enable_tcl="no"
711 not_found="$not_found tcl"
712 fi
713 else
714 not_asked="$not_asked tcl"
715 fi
716
717 if test "x$enable_tcl" = "xyes" ; then
718 AC_SUBST(TCL_CFLAGS)
719 AC_SUBST(TCL_LFLAGS)
720 AC_DEFINE(PLUGIN_TCL)
721 fi
722
723 # --------------------------------- guile -------------------------------------
724
725 GUILE_VERSION=
726
727 if test "x$enable_guile" = "xyes" ; then
728 enable_plugins="yes"
729
730 guile_found="no"
731 AC_MSG_CHECKING(for Guile headers and libraries)
732 echo
733 for v in "3.0" "2.2" "2.0" ; do
734 pkgconfig_guile_found=`$PKGCONFIG --exists guile-$v 2>/dev/null`
735 if test "x$?" = "x0" ; then
736 GUILE_VERSION=`$PKGCONFIG --modversion guile-$v`
737 GUILE_CFLAGS=`$PKGCONFIG --cflags guile-$v`
738 GUILE_LFLAGS=`$PKGCONFIG --libs guile-$v`
739 guile_found="yes"
740 break
741 fi
742 done
743
744 if test "x$guile_found" = "xyes" ; then
745 # check if variable "scm_install_gmp_memory_functions" exists
746 ac_save_CFLAGS="$CFLAGS"
747 ac_save_LDFLAGS="$LDFLAGS"
748 CFLAGS="$CFLAGS $GUILE_CFLAGS"
749 LDFLAGS="$LDFLAGS $GUILE_LFLAGS"
750 AC_CACHE_CHECK([for variable scm_install_gmp_memory_functions], ac_cv_have_guile_gmp_memory_functions, [
751 AC_LINK_IFELSE([AC_LANG_PROGRAM(
752 [[ #include <libguile.h>]],
753 [[ scm_install_gmp_memory_functions = 0; ]])],
754 [ ac_have_guile_gmp_memory_functions="yes" ],
755 [ ac_have_guile_gmp_memory_functions="no" ])])
756 CFLAGS="$ac_save_CFLAGS"
757 LDFLAGS="$ac_save_LDFLAGS"
758 if test "x$ac_have_guile_gmp_memory_functions" = "xyes"; then
759 AC_DEFINE(HAVE_GUILE_GMP_MEMORY_FUNCTIONS)
760 fi
761 else
762 AC_MSG_WARN([
763 *** Guile >= 2.0 couldn't be found on your system.
764 *** WeeChat will be built without Guile (scheme) support.])
765 enable_guile="no"
766 not_found="$not_found guile"
767 fi
768 else
769 not_asked="$not_asked guile"
770 fi
771
772 if test "x$enable_guile" = "xyes" ; then
773 AC_SUBST(GUILE_CFLAGS)
774 AC_SUBST(GUILE_LFLAGS)
775 AC_DEFINE(PLUGIN_GUILE)
776 fi
777
778 # ------------------------------ javascript -----------------------------------
779
780 AC_LANG_PUSH([C++])
781
782 if test "x$enable_javascript" = "xyes" ; then
783 enable_plugins="yes"
784
785 v8_found="no"
786 AC_CHECK_HEADER(v8.h,ac_found_v8_header="yes",ac_found_v8_header="no")
787 if test "x$ac_found_v8_header" = "xyes" ; then
788 #AC_CHECK_LIB(v8,v8,ac_found_v8_lib="yes",ac_found_v8_lib="no")
789 ac_save_LIBS="$LIBS"
790 LIBS="$LIBS -lv8 -lpthread"
791 AC_MSG_CHECKING(for v8 usability in programs)
792 AC_TRY_RUN([
793 #include <v8.h>
794 using namespace v8;
795 int main(int argc, char **argv) {
796 const char *version = V8::GetVersion();
797 return 0;
798 }],ac_found_v8_lib="yes", ac_found_v8_lib="no", ac_found_v8_lib="assume-yes")
799 LIBS="$ac_save_LIBS"
800 if test "x$ac_found_v8_lib" = "xyes" ; then
801 AC_MSG_RESULT(yes)
802 v8_found="yes"
803 V8_CFLAGS=""
804 V8_LFLAGS="-lv8 -lpthread"
805 else
806 AC_MSG_RESULT(no)
807 AC_MSG_WARN([
808 *** V8 library couldn't be found on your system.
809 *** WeeChat will be built without JavaScript support.])
810 enable_javascript="no"
811 not_found="$not_found javascript/v8"
812 fi
813 else
814 AC_MSG_WARN([
815 *** V8 header files couldn't be found on your system.
816 *** WeeChat will be built without JavaScript support.])
817 enable_javascript="no"
818 not_found="$not_found javascript/v8"
819 fi
820 else
821 not_asked="$not_asked javascript"
822 fi
823
824 if test "x$enable_javascript" = "xyes" ; then
825 AC_SUBST(V8_CFLAGS)
826 AC_SUBST(V8_LFLAGS)
827 AC_DEFINE(PLUGIN_JAVASCRIPT)
828 fi
829
830 AC_LANG_POP
831
832 # ---------------------------------- php --------------------------------------
833
834 PHP_VERSION=
835
836 if test "x$enable_php" = "xyes" ; then
837 ac_save_CXXFLAGS="$CXXFLAGS"
838 ac_save_CFLAGS="$CFLAGS"
839 ac_save_LDFLAGS="$LDFLAGS"
840
841 PHP_CFLAGS=""
842 PHP_LFLAGS=""
843
844 if test -n "$php_inc"; then
845 CFLAGS="$CFLAGS -I$php_inc"
846 CXXFLAGS="$CXXFLAGS -I$php_inc"
847 fi
848 if test -n "$php_lib"; then
849 LDFLAGS="$LDFLAGS -L$php_lib"
850 fi
851
852 if test "x$PHP_CFLAGS" = "x" -o "x$PHP_LFLAGS" = "x" ; then
853 AC_MSG_CHECKING(for PHP headers and libraries with pkg-config)
854 echo
855 for l in "7.4" "74" "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
856 pkgconfig_php_found=`$PKGCONFIG --exists php$l 2>/dev/null`
857 if test "x$?" = "x0" ; then
858 pkgconfig_php_found=`$PKGCONFIG --atleast-version=7 php$l 2>/dev/null`
859 if test "x$?" = "x0" ; then
860 PHP_VERSION=`$PKGCONFIG --modversion php$l`
861 PHP_CFLAGS="$PHP_CFLAGS "`$PKGCONFIG --cflags php$l`
862 PHP_LFLAGS="$PHP_LFLAGS "`$PKGCONFIG --libs php$l`
863 break
864 fi
865 fi
866 done
867 fi
868
869 if test "x$PHP_CFLAGS" = "x" -o "x$PHP_LFLAGS" = "x" ; then
870 PHPCONFIG=""
871 AC_MSG_CHECKING(for PHP headers and libraries with php-config)
872 for l in "7.4" "74" "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
873 AC_CHECK_PROG(PHPCONFIG, "php-config$l", "php-config$l")
874 if test "x$PHPCONFIG" != "x" ; then
875 php_config_version=`$PHPCONFIG --version`
876 if test "x${php_config_version#7}" != "x${php_config_version}" ; then
877 PHP_VERSION=$php_config_version
878 PHP_CFLAGS=`$PHPCONFIG --includes`
879 PHP_LFLAGS="-L$($PHPCONFIG --prefix)/lib/ $($PHPCONFIG --libs) -lphp$l"
880 break
881 fi
882 fi
883 done
884 fi
885
886 if test "x$PHP_CFLAGS" = "x" -o "x$PHP_LFLAGS" = "x" ; then
887 AC_MSG_CHECKING(for PHP headers and libraries)
888 echo
889 AC_CHECK_HEADER(php.h,ac_found_php_header="yes",ac_found_php_header="no")
890 if test "x$ac_found_php_header" = "xyes" ; then
891 PHP_CFLAGS="$CFLAGS"
892 fi
893 for l in "7.4" "74" "7.3" "73" "7.2" "72" "7.1" "71" "7.0" "70" "7" "$php_suffix" "" ; do
894 AC_CHECK_LIB(php$l,php_execute_script,ac_found_php_lib="yes",ac_found_php_lib="no")
895 if test "x$ac_found_php_lib" = "xyes" ; then
896 PHP_VERSION=">=7.0.0"
897
898 PHP_LFLAGS="$LDFLAGS -lphp7 -lm"
899
900 ac2_save_LDFLAGS="$LDFLAGS"
901 LDFLAGS="$LDFLAGS -lphp7 -lm"
902
903 if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
904 LDFLAGS="$LDFLAGS -ldl"
905 fi
906
907 LDFLAGS="$ac2_save_LDFLAGS"
908 break
909 fi
910 done
911 fi
912
913 AC_MSG_CHECKING(for PHP compiling and linking)
914 PHP_TEST=`LT=phptest.c ; echo "#include <sapi/embed/php_embed.h>" > $LT; echo "int main() { php_embed_init(0, NULL); php_embed_shutdown(); return 0; }" >> $LT ; $CC -Wall $LT -o $LT.out $PHP_CFLAGS $PHP_LFLAGS $CFLAGS $LDFLAGS 1>/dev/null 2>&1 ; echo $?; rm -f $LT $LT.out 1>/dev/null 2>&1`
915 if test "x$PHP_TEST" != "x0" ; then
916 AC_MSG_RESULT(no)
917 AC_MSG_WARN([
918 *** PHP (>=7.0) headers and/or libraries couldn't be found on your system.
919 *** Try to install libphp-embed with your software package manager.
920 *** WeeChat will be built without PHP support.])
921 enable_php="no"
922 not_found="$not_found php"
923 else
924 AC_MSG_RESULT(yes)
925 fi
926
927 CFLAGS="$ac_save_CFLAGS"
928 CXXFLAGS="$ac_save_CXXFLAGS"
929 LDFLAGS="$ac_save_LDFLAGS"
930 else
931 not_asked="$not_asked php"
932 fi
933
934 if test "x$enable_php" = "xyes" ; then
935 AC_SUBST(PHP_CFLAGS)
936 AC_SUBST(PHP_LFLAGS)
937 AC_DEFINE(PLUGIN_PHP)
938 fi
939
940 # ----------------------------------- spell ------------------------------------
941
942 if test "x$enable_spell" = "xyes" ; then
943 ac_found_enchant_lib="no"
944 if test "x$enable_enchant" = "xyes" ; then
945 PKG_CHECK_MODULES(ENCHANT, [enchant], ac_found_enchant_lib="yes", ac_found_enchant_lib="no")
946 fi
947 if test "x$ac_found_enchant_lib" = "xyes" ; then
948 CFLAGS="$CFLAGS -DUSE_ENCHANT"
949 SPELL_LIB_USED="enchant"
950
951 # check if function enchant_get_version() exists
952 ac_save_CFLAGS="$CFLAGS"
953 ac_save_LDFLAGS="$LDFLAGS"
954 CFLAGS="$CFLAGS $ENCHANT_CFLAGS"
955 LDFLAGS="$LDFLAGS $ENCHANT_LIBS"
956 AC_CACHE_CHECK([for enchant_get_version() support], ac_cv_have_enchant_get_version, [
957 AC_LINK_IFELSE([AC_LANG_PROGRAM(
958 [[ #include <enchant.h>]],
959 [[ const char *version = enchant_get_version(); ]])],
960 [ ac_have_enchant_get_version="yes" ],
961 [ ac_have_enchant_get_version="no" ])])
962 CFLAGS="$ac_save_CFLAGS"
963 LDFLAGS="$ac_save_LDFLAGS"
964 if test "x$ac_have_enchant_get_version" = "xyes"; then
965 AC_DEFINE(HAVE_ENCHANT_GET_VERSION)
966 fi
967 else
968 ASPELL_CFLAGS=""
969 ASPELL_LFLAGS=""
970
971 AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
972 AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
973
974 AC_MSG_CHECKING(for aspell headers and libraries)
975 if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
976 AC_MSG_RESULT(no)
977 AC_MSG_WARN([
978 *** Aspell headers and/or libraries couldn't be found on your system.
979 *** Try to install them with your software package manager.
980 *** WeeChat will be built without Aspell support.])
981 enable_spell="no"
982 not_found="$not_found spell"
983 else
984 AC_MSG_RESULT(yes)
985 ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
986 SPELL_LIB_USED="aspell"
987
988 # check if function aspell_version_string() exists
989 ac_save_LDFLAGS="$LDFLAGS"
990 LDFLAGS="$LDFLAGS $ASPELL_LFLAGS"
991 AC_CACHE_CHECK([for aspell_version_string() support], ac_cv_have_aspell_version_string, [
992 AC_LINK_IFELSE([AC_LANG_PROGRAM(
993 [[ #include <aspell.h>]],
994 [[ const char *version = aspell_version_string(); ]])],
995 [ ac_have_aspell_version_string="yes" ],
996 [ ac_have_aspell_version_string="no" ])])
997 LDFLAGS="$ac_save_LDFLAGS"
998 if test "x$ac_have_aspell_version_string" = "xyes"; then
999 AC_DEFINE(HAVE_ASPELL_VERSION_STRING)
1000 fi
1001 fi
1002 fi
1003 else
1004 not_asked="$not_asked spell"
1005 fi
1006
1007 if test "x$enable_spell" = "xyes" ; then
1008 AC_SUBST(ASPELL_CFLAGS)
1009 AC_SUBST(ASPELL_LFLAGS)
1010 AC_DEFINE(PLUGIN_SPELL)
1011 fi
1012
1013 # --------------------------------- trigger ------------------------------------
1014
1015 if test "x$enable_trigger" = "xyes" ; then
1016 TRIGGER_CFLAGS=""
1017 TRIGGER_LFLAGS=""
1018 AC_SUBST(TRIGGER_CFLAGS)
1019 AC_SUBST(TRIGGER_LFLAGS)
1020 AC_DEFINE(PLUGIN_TRIGGER)
1021 else
1022 not_asked="$not_asked trigger"
1023 fi
1024
1025 # ---------------------------------- xfer --------------------------------------
1026
1027 if test "x$enable_xfer" = "xyes" ; then
1028 XFER_CFLAGS=""
1029 XFER_LFLAGS=""
1030 AC_SUBST(XFER_CFLAGS)
1031 AC_SUBST(XFER_LFLAGS)
1032 AC_DEFINE(PLUGIN_XFER)
1033 else
1034 not_asked="$not_asked xfer"
1035 fi
1036
1037 # ------------------------------------------------------------------------------
1038 # gcrypt
1039 # ------------------------------------------------------------------------------
1040
1041 AC_CHECK_HEADER(gcrypt.h,ac_found_gcrypt_header="yes",ac_found_gcrypt_header="no")
1042 AC_CHECK_LIB(gcrypt,gcry_check_version,ac_found_gcrypt_lib="yes",ac_found_gcrypt_lib="no")
1043
1044 AC_MSG_CHECKING(for gcrypt headers and libraries)
1045 if test "x$ac_found_gcrypt_header" = "xno" -o "x$ac_found_gcrypt_lib" = "xno" ; then
1046 AC_MSG_RESULT(no)
1047 AC_MSG_ERROR([
1048 *** libgcrypt was not found. You may want to get it from https://www.gnupg.org/ftp/gcrypt/libgcrypt/
1049 *** or try to install it with your software package manager.])
1050 else
1051 AC_MSG_RESULT(yes)
1052 GCRYPT_CFLAGS=`libgcrypt-config --cflags`
1053 GCRYPT_LFLAGS=`libgcrypt-config --libs`
1054 AC_SUBST(GCRYPT_CFLAGS)
1055 AC_SUBST(GCRYPT_LFLAGS)
1056 fi
1057
1058 # ------------------------------------------------------------------------------
1059 # gnutls
1060 # ------------------------------------------------------------------------------
1061
1062 AC_CHECK_HEADER(gnutls/gnutls.h,ac_found_gnutls_header="yes",ac_found_gnutls_header="no")
1063 AC_CHECK_LIB(gnutls,gnutls_global_init,ac_found_gnutls_lib="yes",ac_found_gnutls_lib="no")
1064
1065 AC_MSG_CHECKING(for gnutls headers and libraries)
1066 if test "x$ac_found_gnutls_header" = "xno" -o "x$ac_found_gnutls_lib" = "xno" ; then
1067 AC_MSG_RESULT(no)
1068 AC_MSG_ERROR([
1069 *** libgnutls was not found. You may want to get it from https://www.gnupg.org/ftp/gcrypt/gnutls/
1070 *** or try to install it with your software package manager.])
1071 else
1072 AC_MSG_RESULT(yes)
1073 GNUTLS_CFLAGS=`pkg-config gnutls --cflags`
1074 GNUTLS_LFLAGS=`pkg-config gnutls --libs`
1075 AC_SUBST(GNUTLS_CFLAGS)
1076 AC_SUBST(GNUTLS_LFLAGS)
1077 fi
1078
1079 # ------------------------------------------------------------------------------
1080 # flock
1081 # ------------------------------------------------------------------------------
1082
1083 enable_flock="no"
1084 AC_CACHE_CHECK([for flock() support], ac_cv_have_flock, [
1085 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1086 [[ #include <sys/file.h>]],
1087 [[ flock(0, LOCK_SH); ]])],
1088 [ ac_cv_have_flock="yes" ],
1089 [ ac_cv_have_flock="no" ])])
1090
1091 if test "x$ac_cv_have_flock" = "xyes"; then
1092 enable_flock="yes"
1093 AC_DEFINE(HAVE_FLOCK)
1094 else
1095 not_found="$not_found flock"
1096 fi
1097
1098 # ------------------------------------------------------------------------------
1099 # large file support
1100 # ------------------------------------------------------------------------------
1101
1102 if test "x$enable_largefile" = "xyes" ; then
1103 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES"
1104 CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -D_LARGE_FILES"
1105 else
1106 not_asked="$not_asked largefile"
1107 fi
1108
1109 # ------------------------------------------------------------------------------
1110 # backtrace
1111 # ------------------------------------------------------------------------------
1112
1113 enable_backtrace="no"
1114 if test "x$debug" != "x0" ; then
1115 AC_CACHE_CHECK([for execinfo.h and backtrace], ac_cv_have_backtrace, [
1116 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1117 [[ #include <execinfo.h> ]],
1118 [[ void *trace[128]; int n = backtrace(trace, 128); ]])],
1119 [ ac_cv_have_backtrace="yes" ],
1120 [ ac_cv_have_backtrace="no" ])])
1121 if test "x$ac_cv_have_backtrace" = "xyes"; then
1122 enable_backtrace="yes"
1123 AC_DEFINE(HAVE_BACKTRACE,1,[glibc backtrace function])
1124 else
1125 not_found="$not_found backtrace"
1126 fi
1127 fi
1128
1129 # ------------------------------------------------------------------------------
1130 # eat_newline_glitch
1131 # ------------------------------------------------------------------------------
1132
1133 enable_eatnewlineglitch="no"
1134 AC_CACHE_CHECK([for eat_newline_glitch support], ac_cv_have_eatnewlineglitch, [
1135 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1136 [[ #include <term.h> ]],
1137 [[ eat_newline_glitch = 0; ]])],
1138 [ ac_cv_have_eatnewlineglitch="yes" ],
1139 [ ac_cv_have_eatnewlineglitch="no" ])])
1140
1141 if test "x$ac_cv_have_eatnewlineglitch" = "xyes"; then
1142 enable_eatnewlineglitch="yes"
1143 AC_DEFINE(HAVE_EAT_NEWLINE_GLITCH)
1144 else
1145 not_found="$not_found eat_newline_glitch"
1146 fi
1147
1148 # ------------------------------------------------------------------------------
1149 # zlib
1150 # ------------------------------------------------------------------------------
1151
1152 AC_CHECK_HEADER(zlib.h,ac_found_zlib_header="yes",ac_found_zlib_header="no")
1153 AC_CHECK_LIB(z,compress2,ac_found_zlib_lib="yes",ac_found_zlib_lib="no")
1154
1155 AC_MSG_CHECKING(for zlib headers and libraries)
1156 if test "x$ac_found_zlib_header" = "xno" -o "x$ac_found_zlib_lib" = "xno" ; then
1157 AC_MSG_RESULT(no)
1158 AC_MSG_ERROR([
1159 *** zlib was not found. You may want to get it from https://zlib.net/
1160 *** or try to install it with your software package manager.])
1161 else
1162 AC_MSG_RESULT(yes)
1163 ZLIB_CFLAGS=`pkg-config zlib --cflags`
1164 ZLIB_LFLAGS=`pkg-config zlib --libs`
1165 AC_SUBST(ZLIB_CFLAGS)
1166 AC_SUBST(ZLIB_LFLAGS)
1167 fi
1168
1169 # ------------------------------------------------------------------------------
1170 # curl
1171 # ------------------------------------------------------------------------------
1172
1173 AC_PATH_PROG(CURL_CONFIG, curl-config)
1174 if test "x$CURL_CONFIG" = "x" ; then
1175 AC_MSG_ERROR([
1176 *** "curl-config" couldn't be found on your system.
1177 *** Try to install libcurl-dev with your software package manager.])
1178 fi
1179 CURL_CFLAGS=`$CURL_CONFIG --cflags`
1180 CURL_LFLAGS=`$CURL_CONFIG --libs`
1181 AC_SUBST(CURL_CFLAGS)
1182 AC_SUBST(CURL_LFLAGS)
1183
1184 # ------------------------------------------------------------------------------
1185 # tests
1186 # ------------------------------------------------------------------------------
1187
1188 if test "x$enable_tests" = "xyes" ; then
1189 cpputest_found="no"
1190 AC_MSG_CHECKING(for CppUTest headers and libraries)
1191 echo
1192 pkgconfig_cpputest_found=`$PKGCONFIG --exists cpputest 2>/dev/null`
1193 if test "x$?" = "x0" ; then
1194 CPPUTEST_VERSION=`$PKGCONFIG --modversion cpputest`
1195 CPPUTEST_CFLAGS=`$PKGCONFIG --cflags cpputest`
1196 CPPUTEST_LFLAGS=`$PKGCONFIG --libs cpputest`
1197 else
1198 AC_MSG_WARN([
1199 *** CppUTest couldn't be found on your system.
1200 *** WeeChat will be built without tests.])
1201 enable_tests="no"
1202 not_found="$not_found tests"
1203 fi
1204 else
1205 not_asked="$not_asked tests"
1206 fi
1207
1208 if test "x$enable_tests" = "xyes" ; then
1209 AC_SUBST(CPPUTEST_CFLAGS)
1210 AC_SUBST(CPPUTEST_LFLAGS)
1211 AC_DEFINE(TESTS)
1212 fi
1213
1214 # ------------------------------------------------------------------------------
1215 # man page / documentation
1216 # ------------------------------------------------------------------------------
1217
1218 msg_man=""
1219 msg_doc=""
1220
1221 if test "x$enable_man" = "xno"; then
1222 not_asked="$not_asked man"
1223 fi
1224 if test "x$enable_doc" = "xno"; then
1225 not_asked="$not_asked doc"
1226 fi
1227
1228 if test "x$enable_man" = "xyes" -o "x$enable_doc" = "xyes"; then
1229 AC_CHECK_PROGS(ASCIIDOCTOR, [asciidoctor])
1230 if test -n "$ASCIIDOCTOR"; then
1231 AC_MSG_CHECKING([for asciidoctor version])
1232 asciidoctor_version=`$ASCIIDOCTOR --version 2>/dev/null | head -n 1 | cut -d" " -f2`
1233 case "${asciidoctor_version}" in
1234 Asciidoctor' '0.*|Asciidoctor' '1.5.[0-3]*)
1235 AC_MSG_RESULT([${asciidoctor_version} (too old)])
1236 not_found="$not_found asciidoctor"
1237 enable_man="no"
1238 enable_doc="no"
1239 ;;
1240 *)
1241 AC_MSG_RESULT([${asciidoctor_version}])
1242 if test "x$enable_man" = "xyes"; then
1243 msg_man="asciidoctor(${asciidoctor_version}) $msg_man"
1244 AC_DEFINE(MAN)
1245 fi
1246 if test "x$enable_doc" = "xyes"; then
1247 msg_doc="asciidoctor(${asciidoctor_version}) $msg_doc"
1248 AC_DEFINE(DOC)
1249 fi
1250 ;;
1251 esac
1252 else
1253 not_found="$not_found asciidoctor"
1254 enable_man="no"
1255 enable_doc="no"
1256 fi
1257 ASCIIDOCTOR_ARGS="-a experimental -a 'prewrap!' -a icons=font -a sectanchors -a source-highlighter=prettify"
1258 AC_SUBST(ASCIIDOCTOR)
1259 AC_SUBST(ASCIIDOCTOR_ARGS)
1260 fi
1261
1262 # ------------------------------------------------------------------------------
1263 # general vars
1264 # ------------------------------------------------------------------------------
1265
1266 if test "x$prefix" = "xNONE" ; then
1267 prefix="$ac_default_prefix"
1268 fi
1269
1270 if test "x$exec_prefix" = "xNONE" ; then
1271 exec_prefix="$prefix"
1272 fi
1273
1274 AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
1275
1276 WEECHAT_LIBDIR=`eval eval echo ${libdir}/weechat`
1277 AC_DEFINE_UNQUOTED(WEECHAT_LIBDIR, "$WEECHAT_LIBDIR")
1278
1279 WEECHAT_SHAREDIR=`eval eval echo ${datadir}/weechat`
1280 AC_DEFINE_UNQUOTED(WEECHAT_SHAREDIR, "$WEECHAT_SHAREDIR")
1281
1282 weechat_libdir=${libdir}/weechat
1283 AC_SUBST(weechat_libdir)
1284
1285 COMMON_CFLAGS="-fsigned-char -Wall -Wextra -Werror-implicit-function-declaration"
1286 COMMON_CXXFLAGS="-fsigned-char -Wall -Wextra"
1287
1288 AC_MSG_CHECKING([whether we have GNU assembler])
1289 GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
1290 if test "$GAS"; then
1291 COMMON_CFLAGS="${COMMON_CFLAGS} -pipe"
1292 COMMON_CXXFLAGS="${COMMON_CXXFLAGS} -pipe"
1293 AC_MSG_RESULT(yes)
1294 else
1295 AC_MSG_RESULT(no)
1296 fi
1297
1298 CFLAGS=`echo $CFLAGS | sed 's/ -g / /g'`
1299 CFLAGS=`echo $CFLAGS | sed 's/^-g //g'`
1300 CFLAGS=`echo $CFLAGS | sed 's/ -g$//g'`
1301 CFLAGS=`echo $CFLAGS | sed 's/^-g$//g'`
1302
1303 CXXFLAGS=`echo $CXXFLAGS | sed 's/ -g / /g'`
1304 CXXFLAGS=`echo $CXXFLAGS | sed 's/^-g //g'`
1305 CXXFLAGS=`echo $CXXFLAGS | sed 's/ -g$//g'`
1306 CXXFLAGS=`echo $CXXFLAGS | sed 's/^-g$//g'`
1307
1308 if test "x$debug" = "x0" ; then
1309 CFLAGS="$COMMON_CFLAGS $CFLAGS"
1310 CXXFLAGS="$COMMON_CXXFLAGS $CXXFLAGS"
1311 else
1312 CFLAGS="$COMMON_CFLAGS $CFLAGS -g -O0"
1313 CXXFLAGS="$COMMON_CXXFLAGS $CXXFLAGS -g -O0"
1314 fi
1315
1316 LIBS="$LIBS $INTLLIBS"
1317
1318 case "$host_os" in
1319 freebsd*)
1320 if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
1321 CFLAGS="$CFLAGS -pthread"
1322 fi
1323 CFLAGS="$CFLAGS $CXXFLAGS"
1324 ;;
1325 openbsd*)
1326 if test "x$enable_python" = "xyes" ; then
1327 CFLAGS="$CFLAGS -pthread"
1328 fi
1329 ;;
1330 netbsd*)
1331 if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
1332 CFLAGS="$CFLAGS -pthread"
1333 fi
1334 CFLAGS="$CFLAGS $CXXFLAGS"
1335 ;;
1336 gnu*)
1337 LDFLAGS="$LDFLAGS -lpthread"
1338 ;;
1339 haiku*)
1340 LDFLAGS="$LDFLAGS -lnetwork"
1341 ;;
1342 *)
1343 ;;
1344 esac
1345
1346 CFLAGS="$CFLAGS -DWEECHAT_VERSION=\\\"$VERSION\\\" -DWEECHAT_LICENSE=\\\"$LICENSE\\\""
1347 CXXFLAGS="$CXXFLAGS -DWEECHAT_VERSION=\\\"$VERSION\\\" -DWEECHAT_LICENSE=\\\"$LICENSE\\\""
1348
1349 # ------------------------------------------------------------------------------
1350 # output Makefiles
1351 # ------------------------------------------------------------------------------
1352
1353 AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
1354 AM_CONDITIONAL(HAVE_EAT_NEWLINE_GLITCH, test "$enable_eatnewlineglitch" = "yes")
1355 AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
1356 AM_CONDITIONAL(HEADLESS, test "$enable_headless" = "yes")
1357 AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
1358 AM_CONDITIONAL(PLUGIN_BUFLIST, test "$enable_buflist" = "yes")
1359 AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
1360 AM_CONDITIONAL(PLUGIN_EXEC, test "$enable_exec" = "yes")
1361 AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
1362 AM_CONDITIONAL(PLUGIN_FSET, test "$enable_fset" = "yes")
1363 AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
1364 AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes")
1365 AM_CONDITIONAL(PLUGIN_RELAY, test "$enable_relay" = "yes")
1366 AM_CONDITIONAL(PLUGIN_SCRIPT, test "$enable_script" = "yes")
1367 AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
1368 AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
1369 AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
1370 AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
1371 AM_CONDITIONAL(PLUGIN_TCL, test "$enable_tcl" = "yes")
1372 AM_CONDITIONAL(PLUGIN_GUILE, test "$enable_guile" = "yes")
1373 AM_CONDITIONAL(PLUGIN_JAVASCRIPT, test "$enable_javascript" = "yes")
1374 AM_CONDITIONAL(PLUGIN_PHP, test "$enable_php" = "yes")
1375 AM_CONDITIONAL(PLUGIN_SPELL, test "$enable_spell" = "yes")
1376 AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
1377 AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
1378 AM_CONDITIONAL(TESTS, test "$enable_tests" = "yes")
1379 AM_CONDITIONAL(MAN, test "$enable_man" = "yes")
1380 AM_CONDITIONAL(DOC, test "$enable_doc" = "yes")
1381
1382 AC_OUTPUT([Makefile
1383 icons/Makefile
1384 doc/Makefile
1385 doc/en/Makefile
1386 doc/fr/Makefile
1387 doc/it/Makefile
1388 doc/de/Makefile
1389 doc/pl/Makefile
1390 doc/es/Makefile
1391 doc/ru/Makefile
1392 doc/ja/Makefile
1393 doc/cs/Makefile
1394 src/Makefile
1395 src/core/Makefile
1396 src/plugins/Makefile
1397 src/plugins/alias/Makefile
1398 src/plugins/buflist/Makefile
1399 src/plugins/charset/Makefile
1400 src/plugins/exec/Makefile
1401 src/plugins/fifo/Makefile
1402 src/plugins/fset/Makefile
1403 src/plugins/irc/Makefile
1404 src/plugins/logger/Makefile
1405 src/plugins/relay/Makefile
1406 src/plugins/script/Makefile
1407 src/plugins/perl/Makefile
1408 src/plugins/python/Makefile
1409 src/plugins/ruby/Makefile
1410 src/plugins/lua/Makefile
1411 src/plugins/tcl/Makefile
1412 src/plugins/guile/Makefile
1413 src/plugins/javascript/Makefile
1414 src/plugins/php/Makefile
1415 src/plugins/spell/Makefile
1416 src/plugins/trigger/Makefile
1417 src/plugins/xfer/Makefile
1418 src/gui/Makefile
1419 src/gui/curses/Makefile
1420 src/gui/curses/normal/Makefile
1421 src/gui/curses/headless/Makefile
1422 tests/Makefile
1423 intl/Makefile
1424 po/Makefile.in])
1425
1426 # ------------------------------------------------------------------------------
1427 # end message
1428 # ------------------------------------------------------------------------------
1429
1430 listgui=""
1431 if test "x$enable_ncurses" = "xyes" ; then
1432 listgui="$listgui ncurses"
1433 fi
1434 if test "x$enable_headless" = "xyes" ; then
1435 listgui="$listgui headless"
1436 fi
1437
1438 if test "x$listgui" = "x" ; then
1439 AC_MSG_ERROR([
1440 *** No interface specified...
1441 *** Please enable at least ncurses or headless.])
1442 fi
1443
1444 listplugins=""
1445 if test "x$enable_alias" = "xyes"; then
1446 listplugins="$listplugins alias"
1447 fi
1448 if test "x$enable_buflist" = "xyes"; then
1449 listplugins="$listplugins buflist"
1450 fi
1451 if test "x$enable_charset" = "xyes"; then
1452 listplugins="$listplugins charset"
1453 fi
1454 if test "x$enable_exec" = "xyes"; then
1455 listplugins="$listplugins exec"
1456 fi
1457 if test "x$enable_fifo" = "xyes"; then
1458 listplugins="$listplugins fifo"
1459 fi
1460 if test "x$enable_fset" = "xyes"; then
1461 listplugins="$listplugins fset"
1462 fi
1463 if test "x$enable_irc" = "xyes" ; then
1464 listplugins="$listplugins irc"
1465 fi
1466 if test "x$enable_logger" = "xyes"; then
1467 listplugins="$listplugins logger"
1468 fi
1469 if test "x$enable_relay" = "xyes"; then
1470 listplugins="$listplugins relay"
1471 fi
1472 if test "x$enable_script" = "xyes"; then
1473 listplugins="$listplugins script"
1474 fi
1475 if test "x$enable_perl" = "xyes"; then
1476 listplugins="$listplugins perl($PERL_VERSION)"
1477 fi
1478 if test "x$enable_python" = "xyes"; then
1479 listplugins="$listplugins python($PYTHON_VERSION)"
1480 fi
1481 if test "x$enable_ruby" = "xyes"; then
1482 listplugins="$listplugins ruby($RUBY_VERSION)"
1483 fi
1484 if test "x$enable_lua" = "xyes"; then
1485 listplugins="$listplugins lua($LUA_VERSION)"
1486 fi
1487 if test "x$enable_tcl" = "xyes"; then
1488 listplugins="$listplugins tcl($TCL_VERSION)"
1489 fi
1490 if test "x$enable_guile" = "xyes"; then
1491 listplugins="$listplugins guile($GUILE_VERSION)"
1492 fi
1493 if test "x$enable_javascript" = "xyes"; then
1494 listplugins="$listplugins javascript/v8"
1495 fi
1496 if test "x$enable_php" = "xyes"; then
1497 listplugins="$listplugins php($PHP_VERSION)"
1498 fi
1499 if test "x$enable_spell" = "xyes"; then
1500 listplugins="$listplugins spell($SPELL_LIB_USED)"
1501 fi
1502 if test "x$enable_trigger" = "xyes"; then
1503 listplugins="$listplugins trigger"
1504 fi
1505 if test "x$enable_xfer" = "xyes"; then
1506 listplugins="$listplugins xfer"
1507 fi
1508
1509 listoptional=""
1510 if test "x$enable_flock" = "xyes"; then
1511 listoptional="$listoptional flock"
1512 fi
1513 if test "x$enable_largefile" = "xyes"; then
1514 listoptional="$listoptional largefile"
1515 fi
1516 if test "x$enable_backtrace" = "xyes"; then
1517 listoptional="$listoptional backtrace"
1518 fi
1519
1520 msg_debug="no"
1521 if test "x$debug" != "x0"; then
1522 msg_debug="yes"
1523 fi
1524
1525 msg_tests="no"
1526 if test "x$enable_tests" = "xyes"; then
1527 msg_tests="yes"
1528 fi
1529
1530 if test "x$msg_man" = "x"; then
1531 msg_man="no"
1532 else
1533 msg_man="yes: $msg_man"
1534 fi
1535 if test "x$msg_doc" = "x"; then
1536 msg_doc="no"
1537 else
1538 msg_doc="yes: $msg_doc"
1539 fi
1540
1541 echo ""
1542 echo "Enabled features:"
1543 echo " Interfaces............. :$listgui"
1544 echo " Plugins................ :$listplugins"
1545 echo " Optional features...... :$listoptional"
1546 echo " Compile with debug..... : $msg_debug"
1547 echo " Compile tests.......... : $msg_tests"
1548 echo " Man page............... : $msg_man"
1549 echo " Documentation.......... : $msg_doc"
1550 echo " Certificate authorities : ${CA_FILE}"
1551
1552 if test "x$not_asked" != "x" || test "x$not_found" != "x"; then
1553 echo ""
1554 echo "Disabled features:"
1555 if test "x$not_asked" != "x"; then
1556 echo " - not asked:$not_asked"
1557 fi
1558 if test "x$not_found" != "x"; then
1559 echo " - not found:$not_found"
1560 fi
1561 fi
1562
1563 echo ""
1564 echo "WeeChat home directory is ${WEECHAT_HOME}"
1565 echo ""
1566 eval echo "WeeChat will be installed in $bindir"
1567 echo ""
1568 echo "configure complete, now type 'make' to build WeeChat $VERSION"
1569 echo ""