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