2010-01-03 19:31:55 +01:00
|
|
|
# Copyright (c) 2003-2010 by FlashCode <flashcode@flashtux.org>
|
2003-10-25 14:49:18 +00:00
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
2007-07-02 12:25:13 +00:00
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
2003-10-25 14:49:18 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
2007-07-02 12:25:13 +00:00
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2003-10-25 14:49:18 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ(2.56)
|
2010-01-23 12:20:06 +01:00
|
|
|
AC_INIT(WeeChat, 0.3.2-dev, flashcode@flashtux.org)
|
2007-10-31 18:28:08 +01:00
|
|
|
AC_CONFIG_SRCDIR([src/core/weechat.c])
|
2003-10-25 23:13:40 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2010-01-23 12:20:06 +01:00
|
|
|
AM_INIT_AUTOMAKE([weechat], [0.3.2-dev])
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Checks for programs
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_MAKE_SET
|
2006-09-28 13:34:15 +00:00
|
|
|
AC_GNU_SOURCE
|
2005-10-15 12:34:21 +00:00
|
|
|
AM_PROG_LIBTOOL
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2009-05-08 23:45:54 +02:00
|
|
|
# Files to generate
|
|
|
|
AC_CONFIG_FILES([weechat.pc])
|
|
|
|
|
2005-10-29 17:56:50 +00:00
|
|
|
# Add some flags for some OS
|
|
|
|
case "$host_os" in
|
|
|
|
freebsd* | openbsd*)
|
2007-10-31 18:28:08 +01:00
|
|
|
CFLAGS="$CFLAGS -I/usr/local/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
2005-10-29 17:56:50 +00:00
|
|
|
;;
|
2005-11-01 18:32:10 +00:00
|
|
|
netbsd*)
|
2007-10-31 18:28:08 +01:00
|
|
|
CFLAGS="$CFLAGS -I/usr/pkg/include"
|
|
|
|
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
2005-11-01 18:32:10 +00:00
|
|
|
;;
|
2005-11-13 16:41:44 +00:00
|
|
|
solaris*)
|
2007-10-31 18:28:08 +01:00
|
|
|
LDFLAGS="$LDFLAGS -lsocket -lxnet"
|
2005-10-29 17:56:50 +00:00
|
|
|
;;
|
2009-10-04 11:54:24 +02:00
|
|
|
cygwin*)
|
|
|
|
LDFLAGS="$LDFLAGS -no-undefined"
|
|
|
|
;;
|
2005-10-29 17:56:50 +00:00
|
|
|
esac
|
|
|
|
|
2003-11-01 20:42:16 +00:00
|
|
|
# Gettext
|
2009-10-31 20:45:06 +01:00
|
|
|
ALL_LINGUAS="fr es cs hu de ru pl it"
|
2006-10-29 12:29:01 +00:00
|
|
|
AM_GNU_GETTEXT([use-libtool])
|
|
|
|
AM_GNU_GETTEXT_VERSION([0.15])
|
2003-11-01 20:42:16 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Checks for libraries
|
2005-10-25 09:23:10 +00:00
|
|
|
AC_CHECK_LIB(ncurses, initscr, LIBNCURSES_FOUND=1, LIBNCURSES_FOUND=0)
|
|
|
|
AC_CHECK_LIB(ncursesw, initscr, LIBNCURSESW_FOUND=1, LIBNCURSESW_FOUND=0)
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Checks for header files
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_HEADER_STDC
|
2006-05-20 18:48:13 +00:00
|
|
|
AC_CHECK_HEADERS([arpa/inet.h libintl.h limits.h locale.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h sys/types.h unistd.h pwd.h errno.h regex.h wchar.h sys/file.h])
|
|
|
|
|
|
|
|
if echo "$host_os" | grep "^openbsd" 1>/dev/null 2>&1 ; then
|
|
|
|
AC_CHECK_HEADER(utf8/wchar.h, LDFLAGS="$LDFLAGS -lutf8", [AC_MSG_ERROR([
|
|
|
|
*** on OpenBSD systems, package libutf8 must be installed to compile WeeChat])])
|
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Checks for typedefs, structures, and compiler characteristics
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
2005-04-30 10:29:54 +00:00
|
|
|
AC_MSG_CHECKING([for socklen_t])
|
|
|
|
AC_CACHE_VAL(ac_cv_type_socklen_t,
|
2007-10-31 18:28:08 +01:00
|
|
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
|
[[ #include <sys/types.h>
|
|
|
|
#include <sys/socket.h> ]],
|
|
|
|
[[ socklen_t t; ]])],
|
|
|
|
[ ac_cv_type_socklen_t=yes ],
|
|
|
|
[ ac_cv_type_socklen_t=no ],
|
2005-04-30 10:29:54 +00:00
|
|
|
)])
|
|
|
|
if test $ac_cv_type_socklen_t = no; then
|
|
|
|
AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT($ac_cv_type_socklen_t)
|
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
AC_TYPE_SIGNAL
|
2008-05-04 20:24:20 +02:00
|
|
|
AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strndup strncasecmp strpbrk strrchr strstr regexec])
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Variables in config.h
|
|
|
|
|
|
|
|
AH_VERBATIM([PREFIX], [#undef PREFIX])
|
|
|
|
AH_VERBATIM([WEECHAT_LIBDIR], [#undef WEECHAT_LIBDIR])
|
|
|
|
AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR])
|
2010-02-18 22:02:55 +01:00
|
|
|
AH_VERBATIM([HAVE_GCRYPT], [#undef HAVE_GCRYPT])
|
2008-05-04 20:24:20 +02:00
|
|
|
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
|
|
|
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
|
2007-12-03 18:03:10 +01:00
|
|
|
AH_VERBATIM([PLUGIN_ALIAS], [#undef PLUGIN_ALIAS])
|
2006-06-11 02:28:23 +00:00
|
|
|
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
|
2006-11-08 07:54:33 +00:00
|
|
|
AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
|
2008-02-21 17:31:59 +01:00
|
|
|
AH_VERBATIM([PLUGIN_DEMO], [#undef PLUGIN_DEMO])
|
2007-10-31 18:28:08 +01:00
|
|
|
AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO])
|
2008-02-21 17:31:59 +01:00
|
|
|
AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC])
|
2007-11-11 14:36:34 +01:00
|
|
|
AH_VERBATIM([PLUGIN_LOGGER], [#undef PLUGIN_LOGGER])
|
2008-12-10 17:08:56 +01:00
|
|
|
AH_VERBATIM([PLUGIN_RELAY], [#undef PLUGIN_RELAY])
|
2007-11-11 14:36:34 +01:00
|
|
|
AH_VERBATIM([PLUGIN_PERL], [#undef PLUGIN_PERL])
|
|
|
|
AH_VERBATIM([PLUGIN_PYTHON], [#undef PLUGIN_PYTHON])
|
|
|
|
AH_VERBATIM([PLUGIN_RUBY], [#undef PLUGIN_RUBY])
|
|
|
|
AH_VERBATIM([PLUGIN_LUA], [#undef PLUGIN_LUA])
|
2008-10-05 19:06:46 +02:00
|
|
|
AH_VERBATIM([PLUGIN_TCL], [#undef PLUGIN_TCL])
|
2008-05-04 20:24:20 +02:00
|
|
|
AH_VERBATIM([PLUGIN_XFER], [#undef PLUGIN_XFER])
|
2008-08-30 12:40:39 +02:00
|
|
|
AH_VERBATIM([DOC], [#undef DOC])
|
2003-11-09 00:08:01 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# Arguments for ./configure
|
|
|
|
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_ENABLE(ncurses, [ --disable-ncurses turn off ncurses interface (default=compiled if found)],enable_ncurses=$enableval,enable_ncurses=yes)
|
|
|
|
AC_ARG_ENABLE(wxwidgets, [ --enable-wxwidgets turn on WxWidgets interface (default=off)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
|
|
|
|
AC_ARG_ENABLE(gtk, [ --enable-gtk turn on Gtk interface (default=off)],enable_gtk=$enableval,enable_gtk=no)
|
|
|
|
AC_ARG_ENABLE(qt, [ --enable-qt turn on Qt interface (default=off)],enable_qt=$enableval,enable_qt=no)
|
2010-02-18 22:02:55 +01:00
|
|
|
AC_ARG_ENABLE(gcrypt, [ --disable-gcrypt turn off gcrypt support (default=compiled if found)],enable_gcrypt=$enableval,enable_gcrypt=yes)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_ENABLE(gnutls, [ --disable-gnutls turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
2008-09-07 12:58:47 +00:00
|
|
|
AC_ARG_ENABLE(largefile, [ --disable-largefile turn off Large File Support (default=on)],enable_largefile=$enableval,enable_largefile=yes)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_ENABLE(alias, [ --disable-alias turn off Alias plugin (default=compiled)],enable_alias=$enableval,enable_alias=yes)
|
2008-10-18 16:03:16 +02:00
|
|
|
AC_ARG_ENABLE(aspell, [ --disable-aspell turn off Aspell plugin (default=compiled)],enable_aspell=$enableval,enable_aspell=yes)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_ENABLE(charset, [ --disable-charset turn off Charset plugin (default=compiled if found)],enable_charset=$enableval,enable_charset=yes)
|
|
|
|
AC_ARG_ENABLE(demo, [ --enable-demo turn on Demo plugin (default=off)],enable_demo=$enableval,enable_demo=no)
|
|
|
|
AC_ARG_ENABLE(fifo, [ --disable-fifo turn off Fifo plugin (default=compiled)],enable_fifo=$enableval,enable_fifo=yes)
|
|
|
|
AC_ARG_ENABLE(irc, [ --disable-irc turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes)
|
|
|
|
AC_ARG_ENABLE(logger, [ --disable-logger turn off Logger plugin (default=compiled)],enable_logger=$enableval,enable_logger=yes)
|
2009-05-07 23:47:46 +02:00
|
|
|
AC_ARG_ENABLE(relay, [ --enable-relay turn on Relay plugin (default=off)],enable_relay=$enableval,enable_relay=no)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_ENABLE(scripts, [ --disable-scripts turn off script plugins (default=compiled if found)],enable_scripts=$enableval,enable_scripts=yes)
|
|
|
|
AC_ARG_ENABLE(perl, [ --disable-perl turn off Perl script plugin (default=compiled if found)],enable_perl=$enableval,enable_perl=yes)
|
|
|
|
AC_ARG_ENABLE(python, [ --disable-python turn off Python script plugin (default=compiled if found)],enable_python=$enableval,enable_python=yes)
|
|
|
|
AC_ARG_ENABLE(ruby, [ --disable-ruby turn off Ruby script plugin (default=compiled if found)],enable_ruby=$enableval,enable_ruby=yes)
|
|
|
|
AC_ARG_ENABLE(lua, [ --disable-lua turn off Lua script plugin (default=compiled if found)],enable_lua=$enableval,enable_lua=yes)
|
2008-10-05 19:06:46 +02:00
|
|
|
AC_ARG_ENABLE(tcl, [ --disable-tcl turn off Tcl script plugin (default=compiled if found)],enable_tcl=$enableval,enable_tcl=yes)
|
2008-05-04 20:24:20 +02:00
|
|
|
AC_ARG_ENABLE(xfer, [ --disable-xfer turn off Xfer (file transfer) plugin (default=compiled if found)],enable_xfer=$enableval,enable_xfer=yes)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_WITH(lua-inc, [ --with-lua-inc=DIR, lua include files are in DIR (default=autodetect)],lua_inc=$withval,lua_inc='')
|
|
|
|
AC_ARG_WITH(lua-lib, [ --with-lua-lib=DIR, lua library files are in DIR (default=autodetect)],lua_lib=$withval,lua_lib='')
|
|
|
|
AC_ARG_WITH(lua-suffix, [ --with-lua-suffix=ARG lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
|
2009-11-19 16:03:04 +01:00
|
|
|
AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR directory containing tcl configuration (tclConfig.sh)],tclconfig=$withval,tclconfig='')
|
2008-08-30 12:40:39 +02:00
|
|
|
AC_ARG_ENABLE(doc, [ --disable-doc turn off documentation (default=built)],enable_doc=$enableval,enable_doc=yes)
|
2008-02-21 17:31:59 +01:00
|
|
|
AC_ARG_WITH(debug, [ --with-debug debugging: 0=no debug, 1=debug compilation (default=1)],debug=$withval,debug=1)
|
2007-10-31 18:28:08 +01:00
|
|
|
|
|
|
|
not_asked=""
|
2006-02-11 10:11:10 +00:00
|
|
|
not_found=""
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
# dynamic loader
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
PLUGINS_LFLAGS=
|
|
|
|
|
|
|
|
AC_CHECK_FUNCS(dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
|
|
|
if test "$LIBDL_FOUND" != "yes"; then
|
|
|
|
AC_CHECK_LIB(dl, dlopen, [LIBDL_FOUND=yes; PLUGINS_LFLAGS=-ldl], LIBDL_FOUND=no)
|
|
|
|
fi
|
|
|
|
if test "$LIBDL_FOUND" != "yes"; then
|
|
|
|
AC_MSG_ERROR([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** "dl" library (dynamic library loader) couldn't be found on your system.
|
2007-10-31 18:28:08 +01:00
|
|
|
*** Try to install it with your software package manager.])
|
|
|
|
fi
|
|
|
|
AC_SUBST(PLUGINS_LFLAGS)
|
|
|
|
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# gui
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2005-01-02 13:07:19 +00:00
|
|
|
if test "x$enable_ncurses" = "xyes" ; then
|
2005-10-25 09:23:10 +00:00
|
|
|
if test "$LIBNCURSESW_FOUND" = "0" ; then
|
|
|
|
if test "$LIBNCURSES_FOUND" = "0" ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
2005-10-25 09:23:10 +00:00
|
|
|
*** ncurses library not found!
|
2006-02-11 10:11:10 +00:00
|
|
|
*** WeeChat will be built without ncurses support.])
|
|
|
|
enable_ncurses="no"
|
|
|
|
not_found="$not_found ncurses"
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
2005-10-25 09:23:10 +00:00
|
|
|
*** ncursesw library not found! Falling back to "ncurses"
|
2005-10-25 17:37:13 +00:00
|
|
|
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
2007-10-31 18:28:08 +01:00
|
|
|
NCURSES_LFLAGS="-lncurses"
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2005-10-25 09:23:10 +00:00
|
|
|
else
|
2007-10-31 18:28:08 +01:00
|
|
|
NCURSES_LFLAGS="-lncursesw"
|
2003-11-01 20:42:16 +00:00
|
|
|
fi
|
2006-07-30 23:25:12 +00:00
|
|
|
AC_CHECK_HEADERS([ncurses.h ncursesw/curses.h])
|
2007-10-31 18:28:08 +01:00
|
|
|
AC_SUBST(NCURSES_LFLAGS)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked ncurses"
|
2003-10-26 11:52:22 +00:00
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-16 17:20:46 +00:00
|
|
|
#if test "x$enable_wxwidgets" = "xyes" ; then
|
|
|
|
# AM_OPTIONS_WXCONFIG
|
|
|
|
# AM_PATH_WXCONFIG(2.3.4, wxWin=1)
|
|
|
|
#
|
|
|
|
# if test "$wxWin" != 1; then
|
|
|
|
# AC_MSG_ERROR([
|
|
|
|
#*** wxWindows must be installed on your system
|
|
|
|
#*** but wx-config script couldn't be found.
|
|
|
|
#
|
|
|
|
#*** Please check that wx-config is in path, the directory
|
|
|
|
#*** where wxWindows libraries are installed (returned by
|
|
|
|
#*** 'wx-config --libs' command) is in LD_LIBRARY_PATH or
|
|
|
|
#*** equivalent variable and wxWindows version is 2.3.4 or above.
|
|
|
|
# ])
|
|
|
|
# fi
|
|
|
|
#
|
|
|
|
# CPPFLAGS="$CPPFLAGS $WX_CPPFLAGS"
|
|
|
|
# CXXFLAGS="$CXXFLAGS $WX_CXXFLAGS_ONLY"
|
|
|
|
# CFLAGS="$CFLAGS $WX_CFLAGS_ONLY"
|
|
|
|
# LDFLAGS="$LDFLAGS $WX_LIBS"
|
|
|
|
#
|
|
|
|
# WXWIDGETS_CFLAGS=""
|
|
|
|
# WXWIDGETS_LIBS=""
|
|
|
|
#fi
|
2005-04-24 11:08:22 +00:00
|
|
|
|
2003-10-26 11:52:22 +00:00
|
|
|
if test "x$enable_gtk" = "xyes" ; then
|
2006-02-03 00:36:03 +00:00
|
|
|
AM_PATH_GTK_2_0(2.4.0, LIBGTK_FOUND=1, LIBGTK_FOUND=0)
|
|
|
|
if test "$LIBGTK_FOUND" = "0" ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
|
|
|
*** Gtk library not found!
|
|
|
|
*** WeeChat will be built without Gtk support.])
|
|
|
|
enable_gtk="no"
|
|
|
|
not_found="$not_found gtk"
|
|
|
|
else
|
|
|
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
2007-10-31 18:28:08 +01:00
|
|
|
GTK_LFLAGS=`pkg-config --libs gtk+-2.0`
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_SUBST(GTK_CFLAGS)
|
2007-10-31 18:28:08 +01:00
|
|
|
AC_SUBST(GTK_LFLAGS)
|
2006-02-03 00:36:03 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked gtk"
|
2003-10-26 11:52:22 +00:00
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2007-09-21 16:53:18 +02:00
|
|
|
# ------------------------------------------------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
# iconv
|
2006-06-15 09:04:12 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2006-11-08 07:54:33 +00:00
|
|
|
ICONV_LFLAGS=""
|
2006-06-15 09:04:12 +00:00
|
|
|
|
2007-10-31 18:28:08 +01:00
|
|
|
iconv_found="no"
|
2006-06-15 09:04:12 +00:00
|
|
|
AC_CHECK_HEADER(iconv.h,ac_found_iconv_header="yes",ac_found_iconv_header="no")
|
|
|
|
if test "x$ac_found_iconv_header" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB(iconv,iconv_open,ac_found_iconv_lib="yes",ac_found_iconv_lib="no")
|
2006-10-12 16:42:35 +00:00
|
|
|
if test "x$ac_found_iconv_lib" = "xno" ; then
|
|
|
|
AC_CHECK_LIB(iconv,libiconv_open,ac_found_iconv_lib="yes",ac_found_iconv_lib="no")
|
|
|
|
fi
|
2006-06-15 09:04:12 +00:00
|
|
|
if test "x$ac_found_iconv_lib" = "xyes" ; then
|
2006-11-08 07:54:33 +00:00
|
|
|
ICONV_LFLAGS="-liconv"
|
|
|
|
LIBS="$LIBS $ICONV_LFLAGS"
|
2006-06-15 09:04:12 +00:00
|
|
|
fi
|
2010-03-19 23:33:14 +01:00
|
|
|
AC_MSG_CHECKING(for iconv usability in programs)
|
2006-06-15 09:04:12 +00:00
|
|
|
AC_TRY_RUN([
|
2010-01-24 10:47:53 +01:00
|
|
|
#include <iconv.h>
|
|
|
|
int main(int argc, char **argv) {
|
|
|
|
iconv_t conv = iconv_open("ISO8859-1", "UTF-8");
|
2006-06-15 09:04:12 +00:00
|
|
|
if (conv != (iconv_t) -1) {
|
2010-01-24 10:47:53 +01:00
|
|
|
return 0;
|
2006-06-15 09:04:12 +00:00
|
|
|
}
|
2010-01-24 10:47:53 +01:00
|
|
|
return 1;
|
2006-06-15 09:04:12 +00:00
|
|
|
}],iconv_found="yes")
|
|
|
|
if test "x$iconv_found" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$iconv_found" = "xno" ; then
|
|
|
|
AC_MSG_ERROR([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Iconv headers and/or libraries couldn't be found on your system.
|
2006-06-15 09:04:12 +00:00
|
|
|
*** Try to install them with your software package manager.
|
|
|
|
*** WeeChat can't be built without Iconv support.])
|
|
|
|
fi
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# plugins
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_scripts" = "xno" ; then
|
2006-03-24 09:57:22 +00:00
|
|
|
enable_perl="no"
|
|
|
|
enable_python="no"
|
|
|
|
enable_ruby="no"
|
|
|
|
enable_lua="no"
|
2008-10-05 19:06:46 +02:00
|
|
|
enable_tcl="no"
|
2007-10-31 18:28:08 +01:00
|
|
|
fi
|
|
|
|
|
2007-12-03 18:03:10 +01:00
|
|
|
# ---------------------------------- alias -------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_alias" = "xyes" ; then
|
|
|
|
ALIAS_CFLAGS=""
|
|
|
|
ALIAS_LFLAGS=""
|
|
|
|
AC_SUBST(ALIAS_CFLAGS)
|
|
|
|
AC_SUBST(ALIAS_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_ALIAS)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked alias"
|
|
|
|
fi
|
|
|
|
|
2007-11-11 14:36:34 +01:00
|
|
|
# ---------------------------------- aspell ------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_aspell" = "xyes" ; then
|
|
|
|
ASPELL_CFLAGS=""
|
|
|
|
ASPELL_LFLAGS=""
|
|
|
|
|
|
|
|
AC_CHECK_HEADER(aspell.h,ac_found_aspell_header="yes",ac_found_aspell_header="no")
|
|
|
|
AC_CHECK_LIB(aspell,new_aspell_speller,ac_found_aspell_lib="yes",ac_found_aspell_lib="no")
|
|
|
|
|
2010-03-19 23:33:14 +01:00
|
|
|
AC_MSG_CHECKING(for aspell headers and librairies)
|
2007-11-11 14:36:34 +01:00
|
|
|
if test "x$ac_found_aspell_header" = "xno" -o "x$ac_found_aspell_lib" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Aspell headers and/or libraries couldn't be found on your system.
|
2007-11-11 14:36:34 +01:00
|
|
|
*** Try to install them with your software package manager.
|
|
|
|
*** WeeChat will be built without Aspell support.])
|
|
|
|
enable_aspell="no"
|
|
|
|
not_found="$not_found aspell"
|
|
|
|
else
|
2010-01-24 10:47:53 +01:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
2007-11-11 14:36:34 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
not_asked="$not_asked aspell"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$enable_aspell" = "xyes" ; then
|
|
|
|
AC_SUBST(ASPELL_CFLAGS)
|
|
|
|
AC_SUBST(ASPELL_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_ASPELL)
|
|
|
|
fi
|
|
|
|
|
|
|
|
# --------------------------------- charset ------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_charset" = "xyes" ; then
|
|
|
|
CHARSET_CFLAGS=""
|
|
|
|
CHARSET_LFLAGS="$ICONV_LFLAGS"
|
|
|
|
AC_SUBST(CHARSET_CFLAGS)
|
|
|
|
AC_SUBST(CHARSET_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_CHARSET)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked charset"
|
|
|
|
fi
|
|
|
|
|
2008-02-21 17:31:59 +01:00
|
|
|
# ---------------------------------- demo --------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_demo" = "xyes" ; then
|
|
|
|
DEMO_CFLAGS=""
|
|
|
|
DEMO_LFLAGS=""
|
|
|
|
AC_SUBST(DEMO_CFLAGS)
|
|
|
|
AC_SUBST(DEMO_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_DEMO)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked demo"
|
|
|
|
fi
|
|
|
|
|
2007-11-11 14:36:34 +01:00
|
|
|
# ---------------------------------- fifo --------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_fifo" = "xyes" ; then
|
|
|
|
FIFO_CFLAGS=""
|
|
|
|
FIFO_LFLAGS=""
|
|
|
|
AC_SUBST(FIFO_CFLAGS)
|
|
|
|
AC_SUBST(FIFO_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_FIFO)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked fifo"
|
|
|
|
fi
|
|
|
|
|
2008-02-21 17:31:59 +01:00
|
|
|
# ----------------------------------- irc --------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_irc" = "xyes" ; then
|
|
|
|
AC_DEFINE(PLUGIN_IRC)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked irc"
|
|
|
|
fi
|
|
|
|
|
2007-11-11 14:36:34 +01:00
|
|
|
# --------------------------------- logger -------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_logger" = "xyes" ; then
|
|
|
|
LOGGER_CFLAGS=""
|
|
|
|
LOGGER_LFLAGS=""
|
|
|
|
AC_SUBST(LOGGER_CFLAGS)
|
|
|
|
AC_SUBST(LOGGER_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_LOGGER)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked logger"
|
|
|
|
fi
|
|
|
|
|
2008-12-10 17:08:56 +01:00
|
|
|
# --------------------------------- relay --------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_relay" = "xyes" ; then
|
|
|
|
RELAY_CFLAGS=""
|
|
|
|
RELAY_LFLAGS=""
|
|
|
|
AC_SUBST(RELAY_CFLAGS)
|
|
|
|
AC_SUBST(RELAY_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_RELAY)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked relay"
|
|
|
|
fi
|
|
|
|
|
2006-05-19 23:04:06 +00:00
|
|
|
# ---------------------------------- perl --------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
|
2006-10-09 17:22:32 +00:00
|
|
|
PERL_VERSION=
|
2006-05-19 23:04:06 +00:00
|
|
|
|
2003-11-09 00:08:01 +00:00
|
|
|
if test "x$enable_perl" = "xyes" ; then
|
2005-12-15 12:32:36 +00:00
|
|
|
AC_PATH_PROGS(PERL, perl perl5)
|
2005-05-07 09:29:26 +00:00
|
|
|
if test -z $PERL ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
|
|
|
*** Perl must be installed on your system but perl interpreter couldn't be found in path.
|
|
|
|
*** Please check that perl is in path, or install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Perl support.])
|
|
|
|
enable_perl="no"
|
|
|
|
not_found="$not_found perl"
|
2005-05-24 15:14:54 +00:00
|
|
|
else
|
2010-01-24 10:47:53 +01:00
|
|
|
PERL_VERSION=`perl -V:version | sed "s/version='\(.*\)';/\1/"`
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_CHECKING(for Perl headers files)
|
|
|
|
|
|
|
|
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) 1>/dev/null 2>&1; echo $?; rm -f $PT $PT.out 1>/dev/null 2>&1`
|
|
|
|
|
|
|
|
if test "x$PERL_HEADER_TEST" = "x0" ; then
|
|
|
|
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
AC_MSG_CHECKING(for Perl library)
|
|
|
|
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`
|
2010-01-24 10:47:53 +01:00
|
|
|
if test "x$PERL_LIB_TEST" = "x0" ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Perl library couldn't be found on your system.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Try to install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Perl support.])
|
|
|
|
enable_perl="no"
|
|
|
|
not_found="$not_found perl"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Perl headers couldn't be found on your system.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Try to install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Perl support.])
|
|
|
|
enable_perl="no"
|
|
|
|
not_found="$not_found perl"
|
|
|
|
fi
|
2005-05-24 15:14:54 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked perl"
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2005-05-24 15:14:54 +00:00
|
|
|
|
2006-02-11 10:11:10 +00:00
|
|
|
if test "x$enable_perl" = "xyes" ; then
|
2003-11-09 00:08:01 +00:00
|
|
|
AC_SUBST(PERL_CFLAGS)
|
2005-10-15 12:34:21 +00:00
|
|
|
AC_SUBST(PERL_LFLAGS)
|
2003-11-16 19:40:36 +00:00
|
|
|
AC_DEFINE(PLUGIN_PERL)
|
2003-11-09 00:08:01 +00:00
|
|
|
fi
|
|
|
|
|
2006-05-19 23:04:06 +00:00
|
|
|
# --------------------------------- python -------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
|
2006-10-09 17:22:32 +00:00
|
|
|
PYTHON_VERSION=
|
2006-05-19 23:04:06 +00:00
|
|
|
|
2005-05-01 18:53:23 +00:00
|
|
|
if test "x$enable_python" = "xyes" ; then
|
2006-10-09 10:28:53 +00:00
|
|
|
AC_PATH_PROGS(PYTHON, python python2.5 python2.4 python2.3 python2.2)
|
2005-05-07 09:29:26 +00:00
|
|
|
if test -z $PYTHON ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
|
|
|
*** Python must be installed on your system but python interpreter couldn't be found in path.
|
|
|
|
*** Please check that python is in path, or install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Python support.])
|
|
|
|
enable_python="no"
|
|
|
|
not_found="$not_found python"
|
2005-05-07 09:29:26 +00:00
|
|
|
else
|
2006-02-11 10:11:10 +00:00
|
|
|
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
|
|
|
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
|
|
|
|
PYTHON_INCLUDE=`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for Python header files)
|
|
|
|
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
|
|
|
PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
PYTHON_LIB=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
|
|
|
|
PYTHON_LFLAGS="-lpython$PYTHON_VERSION "`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBS')+' '+distutils.sysconfig.get_config_var('SYSLIBS')+' '+distutils.sysconfig.get_config_var('LINKFORSHARED')"`
|
|
|
|
AC_MSG_CHECKING(for Python library)
|
|
|
|
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
|
|
|
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
|
|
|
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
|
|
|
PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
2010-03-19 23:33:14 +01:00
|
|
|
*** Python library couldn't be found on your system.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Try to install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Python support.])
|
|
|
|
enable_python="no"
|
|
|
|
not_found="$not_found python"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Python header files couldn't be found on your system.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Try to install them with your software package manager.
|
|
|
|
*** WeeChat will be built without Python support.])
|
|
|
|
enable_python="no"
|
|
|
|
not_found="$not_found python"
|
|
|
|
fi
|
2005-05-07 09:29:26 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked python"
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$enable_python" = "xyes" ; then
|
2005-05-01 18:53:23 +00:00
|
|
|
AC_SUBST(PYTHON_CFLAGS)
|
2005-10-15 12:34:21 +00:00
|
|
|
AC_SUBST(PYTHON_LFLAGS)
|
2005-05-01 18:53:23 +00:00
|
|
|
AC_DEFINE(PLUGIN_PYTHON)
|
|
|
|
fi
|
|
|
|
|
2006-05-19 23:04:06 +00:00
|
|
|
# ---------------------------------- ruby --------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
|
2006-10-09 17:22:32 +00:00
|
|
|
RUBY_VERSION=
|
2006-05-19 23:04:06 +00:00
|
|
|
|
2005-08-21 16:32:48 +00:00
|
|
|
if test "x$enable_ruby" = "xyes" ; then
|
2005-12-15 12:32:36 +00:00
|
|
|
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
2005-11-22 14:36:20 +00:00
|
|
|
if test -z $RUBY ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
|
|
|
*** Ruby must be installed on your system but ruby interpreter couldn't be found in path.
|
|
|
|
*** Please check that ruby is in path, or install it with your software package manager.
|
|
|
|
*** WeeChat will be built without Ruby support.])
|
|
|
|
enable_ruby="no"
|
|
|
|
not_found="$not_found ruby"
|
2005-11-22 14:36:20 +00:00
|
|
|
else
|
2010-01-24 10:47:53 +01:00
|
|
|
RUBY_VERSION=`$RUBY -rrbconfig -e "puts Config::CONFIG[['ruby_version']]"`
|
2009-11-29 16:41:08 +01:00
|
|
|
if test "$RUBY_VERSION" = "1.9.0"; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
2009-11-29 16:41:08 +01:00
|
|
|
*** Ruby header files have been found, but they're of the version 1.9.0.
|
|
|
|
*** Ruby 1.9.0 is an unstable release and should not be used in production.
|
|
|
|
*** Please install Ruby >=1.8.6 or 1.9.1.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** WeeChat will be built without Ruby support.])
|
|
|
|
enable_ruby="no"
|
|
|
|
not_found="$not_found ruby"
|
2009-11-29 16:41:08 +01:00
|
|
|
else
|
|
|
|
RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts Config::CONFIG[['rubyhdrdir']] || Config::CONFIG[['archdir']]"`
|
|
|
|
RUBY_ARCH=`$RUBY -rrbconfig -e 'print Config::CONFIG[["arch"]]'`
|
|
|
|
AC_MSG_CHECKING(for Ruby header files)
|
|
|
|
if test -d "$RUBY_INCLUDE/"; then
|
|
|
|
M_RUBY_VERSION=`$RUBY -rrbconfig -e "puts Config::CONFIG[['ruby_version']].gsub(/\./, '')[[0,2]]"`
|
|
|
|
RUBY_CFLAGS="-I$RUBY_INCLUDE/ -I$RUBY_INCLUDE/$RUBY_ARCH -DRUBY_VERSION=$M_RUBY_VERSION"
|
|
|
|
else
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** Ruby header files couldn't be found on your system.
|
|
|
|
*** Try to install them with your software package manager.
|
|
|
|
*** WeeChat will be built without Ruby support.])
|
|
|
|
enable_ruby="no"
|
|
|
|
not_found="$not_found ruby"
|
|
|
|
fi
|
|
|
|
AC_MSG_RESULT(found)
|
|
|
|
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2005-11-22 14:36:20 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked ruby"
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2005-11-22 14:36:20 +00:00
|
|
|
|
2006-02-11 10:11:10 +00:00
|
|
|
if test "x$enable_ruby" = "xyes" ; then
|
2005-08-21 16:32:48 +00:00
|
|
|
AC_SUBST(RUBY_CFLAGS)
|
2005-10-15 12:34:21 +00:00
|
|
|
AC_SUBST(RUBY_LFLAGS)
|
2005-08-21 16:32:48 +00:00
|
|
|
AC_DEFINE(PLUGIN_RUBY)
|
|
|
|
fi
|
|
|
|
|
2006-05-19 23:04:06 +00:00
|
|
|
# ---------------------------------- lua --------------------------------------
|
2007-10-31 18:28:08 +01:00
|
|
|
|
2006-10-09 17:22:32 +00:00
|
|
|
LUA_VERSION=
|
2006-05-19 23:04:06 +00:00
|
|
|
|
2006-02-03 00:29:38 +00:00
|
|
|
if test "x$enable_lua" = "xyes" ; then
|
|
|
|
ac_save_CPPFLAGS="$CPPFLAGS"
|
|
|
|
ac_save_CFLAGS="$CFLAGS"
|
2006-05-19 23:04:06 +00:00
|
|
|
ac_save_LDFLAGS="$LDFLAGS"
|
2006-02-03 00:29:38 +00:00
|
|
|
|
|
|
|
LUA_CFLAGS=""
|
|
|
|
LUA_LFLAGS=""
|
|
|
|
|
|
|
|
if test -n "$lua_inc"; then
|
|
|
|
CFLAGS="$CFLAGS -I$lua_inc"
|
|
|
|
CPPFLAGS="$CPPFLAGS -I$lua_inc"
|
|
|
|
fi
|
|
|
|
if test -n "$lua_lib"; then
|
2006-05-19 23:04:06 +00:00
|
|
|
LDFLAGS="$LDFLAGS -L$lua_lib"
|
2006-02-03 00:29:38 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
PKGCONFIG=""
|
|
|
|
AC_CHECK_PROGS(PKGCONFIG, pkg-config)
|
|
|
|
if test "x$PKGCONFIG" != "x"; then
|
2010-01-24 10:47:53 +01:00
|
|
|
AC_MSG_CHECKING(for Lua headers and librairies with pkg-config)
|
|
|
|
echo
|
|
|
|
for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
|
|
|
|
pkgconfig_lua_found=`$PKGCONFIG --exists lua$l 2>/dev/null`
|
|
|
|
if test "x$?" = "x0" ; then
|
|
|
|
LUA_VERSION=`$PKGCONFIG --modversion lua$l`
|
2006-02-11 10:11:10 +00:00
|
|
|
LUA_CFLAGS="$LUA_CFLAGS "`$PKGCONFIG --cflags lua$l`
|
|
|
|
LUA_LFLAGS="$LUA_LFLAGS "`$PKGCONFIG --libs lua$l`
|
2006-10-09 10:28:53 +00:00
|
|
|
|
2010-01-24 10:47:53 +01:00
|
|
|
pkgconfig_lualib_found=`$PKGCONFIG --exists lualib$l 2>/dev/null`
|
|
|
|
if test "x$?" = "x0"; then
|
|
|
|
LUA_CFLAGS="$LUA_CFLAGS "`$PKGCONFIG --cflags lualib$l`
|
|
|
|
LUA_LFLAGS="$LUA_LFLAGS "`$PKGCONFIG --libs lualib$l`
|
|
|
|
fi
|
2006-02-11 10:11:10 +00:00
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
2006-02-03 00:29:38 +00:00
|
|
|
fi
|
2010-03-19 23:33:14 +01:00
|
|
|
fi
|
2006-02-11 10:11:10 +00:00
|
|
|
|
|
|
|
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
|
|
|
LUACONFIG=""
|
2006-10-09 17:22:32 +00:00
|
|
|
AC_CHECK_PROGS(LUACONFIG, lua-config lua-config51 lua-config5.1 lua-config50 lua-config5.0)
|
2006-02-11 10:11:10 +00:00
|
|
|
if test "x$LUACONFIG" != "x" ; then
|
|
|
|
AC_MSG_CHECKING(for Lua headers and librairies with lua-config)
|
2010-01-24 10:47:53 +01:00
|
|
|
echo
|
2006-02-11 10:11:10 +00:00
|
|
|
LUA_CFLAGS=`$LUACONFIG --include`
|
|
|
|
LUA_LFLAGS=`$LUACONFIG --libs`
|
2010-01-24 10:47:53 +01:00
|
|
|
LUA_VERSION="5.0.x"
|
2006-02-03 00:29:38 +00:00
|
|
|
fi
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
|
|
|
|
2010-03-19 23:33:14 +01:00
|
|
|
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_CHECKING(for Lua headers and librairies)
|
2010-01-24 10:47:53 +01:00
|
|
|
echo
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_CHECK_HEADER(lua.h,ac_found_lua_header="yes",ac_found_lua_header="no")
|
|
|
|
AC_CHECK_HEADER(lualib.h,ac_found_liblua_header="yes",ac_found_liblua_header="no")
|
|
|
|
if test "x$ac_found_lua_header" = "xyes" -a "x$ac_found_liblua_header" = "xyes"; then
|
|
|
|
LUA_CFLAGS="$CFLAGS"
|
|
|
|
fi
|
2006-10-09 10:28:53 +00:00
|
|
|
for l in "$lua_suffix" "" "51" "5.1" "50" "5.0" ; do
|
2006-05-19 23:04:06 +00:00
|
|
|
AC_CHECK_LIB(lua$l,lua_call,ac_found_lua_lib="yes",ac_found_lua_lib="no")
|
2006-02-11 10:11:10 +00:00
|
|
|
if test "x$ac_found_lua_lib" = "xyes" ; then
|
2010-01-24 10:47:53 +01:00
|
|
|
LUA_VERSION=">=5.1.0"
|
|
|
|
|
|
|
|
LUA_LFLAGS="$LDFLAGS -llua$l -lm"
|
|
|
|
|
|
|
|
ac2_save_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -llua$l -lm"
|
|
|
|
|
|
|
|
if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
|
|
|
|
LDFLAGS="$LDFLAGS -ldl"
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_CHECK_LIB(lualib$l,luaL_openlib,ac_found_liblua_lib="yes",ac_found_liblua_lib="no")
|
|
|
|
if test "x$ac_found_liblua_lib" = "xyes" ; then
|
|
|
|
LUA_VERSION="5.0.x"
|
|
|
|
|
|
|
|
LUA_LFLAGS="$LUA_LFLAGS -llualib$l"
|
|
|
|
|
|
|
|
if echo "$host_os" | grep "^linux" 1>/dev/null 2>&1 ; then
|
|
|
|
LUA_LFLAGS="$LUA_LFLAGS -ldl"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
LDFLAGS="$ac2_save_LDFLAGS"
|
|
|
|
break
|
|
|
|
fi
|
2006-05-19 23:04:06 +00:00
|
|
|
done
|
2006-02-03 00:29:38 +00:00
|
|
|
fi
|
2006-10-09 10:28:53 +00:00
|
|
|
|
2006-05-19 23:04:06 +00:00
|
|
|
AC_MSG_CHECKING(for Lua compiling and linking)
|
|
|
|
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`
|
|
|
|
if test "x$LUA_TEST" != "x0" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
2006-02-11 10:11:10 +00:00
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Lua (>=5.0) headers and/or librairies couldn't be found on your system.
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Try to install liblua, liblualib and liblua-dev with your software package manager.
|
|
|
|
*** WeeChat will be built without Lua support.])
|
|
|
|
enable_lua="no"
|
|
|
|
not_found="$not_found lua"
|
|
|
|
else
|
2006-05-19 23:04:06 +00:00
|
|
|
AC_MSG_RESULT(yes)
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2006-05-19 23:04:06 +00:00
|
|
|
|
|
|
|
CFLAGS="$ac_save_CFLAGS"
|
|
|
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
|
|
|
LDFLAGS="$ac_save_LDFLAGS"
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked lua"
|
2006-02-11 10:11:10 +00:00
|
|
|
fi
|
2006-02-03 00:29:38 +00:00
|
|
|
|
2006-02-11 10:11:10 +00:00
|
|
|
if test "x$enable_lua" = "xyes" ; then
|
2006-02-03 00:29:38 +00:00
|
|
|
AC_SUBST(LUA_CFLAGS)
|
|
|
|
AC_SUBST(LUA_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_LUA)
|
|
|
|
fi
|
|
|
|
|
2008-10-05 19:06:46 +02:00
|
|
|
# --------------------------------- tcl -------------------------------------
|
2009-09-03 11:26:03 +02:00
|
|
|
|
2008-10-05 19:06:46 +02:00
|
|
|
TCL_VERSION=
|
|
|
|
|
|
|
|
if test "x$enable_tcl" = "xyes" ; then
|
|
|
|
enable_plugins="yes"
|
|
|
|
|
2009-09-03 11:26:03 +02:00
|
|
|
AC_MSG_CHECKING(for tclConfig.sh)
|
|
|
|
tcl_found="no"
|
|
|
|
tcl_dirs="/lib /usr/lib /usr/tcl/lib /usr/lib/tcl8.5 /usr/lib/tcl8.4 /usr/lib/tcl8.3 /usr/local/lib /usr/local/tcl-8.5/lib /usr/local/tcl-8.4/lib /usr/local/tcl-8.3/lib /usr/local/tcl/lib /opt/lib"
|
2009-11-19 16:03:04 +01:00
|
|
|
if test "x$tclconfig" != "x" ; then
|
|
|
|
tcl_dirs="${tclconfig} ${tcl_dirs}"
|
|
|
|
fi
|
2009-09-03 11:26:03 +02:00
|
|
|
for tcl_dir in $tcl_dirs ; do
|
|
|
|
if test -f ${tcl_dir}/tclConfig.sh ; then
|
|
|
|
. ${tcl_dir}/tclConfig.sh
|
|
|
|
TCL_CFLAGS="-I${TCL_PREFIX}/include $TCL_INCLUDE_SPEC"
|
|
|
|
TCL_LFLAGS="$TCL_LIB_SPEC $TCL_LIBS"
|
|
|
|
tcl_found="yes"
|
|
|
|
AC_MSG_RESULT(${tcl_dir}/tclConfig.sh)
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
if test "x$tcl_found" = "xno" ; then
|
2008-10-05 19:06:46 +02:00
|
|
|
AC_MSG_WARN([
|
2009-09-03 11:26:03 +02:00
|
|
|
*** Script tclConfig.sh couldn't be found on your system.
|
2008-10-05 19:06:46 +02:00
|
|
|
*** WeeChat will be built without Tcl support.])
|
|
|
|
enable_tcl="no"
|
|
|
|
not_found="$not_found tcl"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$enable_tcl" = "xyes" ; then
|
|
|
|
AC_SUBST(TCL_CFLAGS)
|
|
|
|
AC_SUBST(TCL_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_TCL)
|
|
|
|
fi
|
|
|
|
|
2008-05-04 20:24:20 +02:00
|
|
|
# ---------------------------------- xfer --------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_xfer" = "xyes" ; then
|
|
|
|
XFER_CFLAGS=""
|
|
|
|
XFER_LFLAGS=""
|
|
|
|
AC_SUBST(XFER_CFLAGS)
|
|
|
|
AC_SUBST(XFER_LFLAGS)
|
|
|
|
AC_DEFINE(PLUGIN_XFER)
|
|
|
|
else
|
|
|
|
not_asked="$not_asked xfer"
|
|
|
|
fi
|
|
|
|
|
2010-02-18 22:02:55 +01:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# gcrypt
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if test "x$enable_gcrypt" = "xyes" ; then
|
|
|
|
AC_CHECK_HEADER(gcrypt.h,ac_found_gcrypt_header="yes",ac_found_gcrypt_header="no")
|
|
|
|
AC_CHECK_LIB(gcrypt,gcry_check_version,ac_found_gcrypt_lib="yes",ac_found_gcrypt_lib="no")
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for gcrypt headers and librairies)
|
|
|
|
if test "x$ac_found_gcrypt_header" = "xno" -o "x$ac_found_gcrypt_lib" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_WARN([
|
|
|
|
*** libgcrypt was not found. You may want to get it from ftp://ftp.gnupg.org/gcrypt/libgcrypt/
|
|
|
|
*** WeeChat will be built without gcrypt support.
|
|
|
|
*** Some features like SASL authentication with IRC server using mechanism DH-BLOWFISH will be disabled.])
|
|
|
|
enable_gcrypt="no"
|
|
|
|
not_found="$not_found gcrypt"
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
GCRYPT_CFLAGS=`libgcrypt-config --cflags`
|
|
|
|
GCRYPT_LFLAGS=`libgcrypt-config --libs`
|
|
|
|
AC_SUBST(GCRYPT_CFLAGS)
|
|
|
|
AC_SUBST(GCRYPT_LFLAGS)
|
|
|
|
AC_DEFINE(HAVE_GCRYPT)
|
|
|
|
CFLAGS="$CFLAGS -DHAVE_GCRYPT"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
not_asked="$not_asked gcrypt"
|
|
|
|
fi
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# gnutls
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2005-06-22 18:50:24 +00:00
|
|
|
if test "x$enable_gnutls" = "xyes" ; then
|
2010-02-18 22:02:55 +01:00
|
|
|
AC_CHECK_HEADER(gnutls/gnutls.h,ac_found_gnutls_header="yes",ac_found_gnutls_header="no")
|
|
|
|
AC_CHECK_LIB(gnutls,gnutls_global_init,ac_found_gnutls_lib="yes",ac_found_gnutls_lib="no")
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for gnutls headers and librairies)
|
|
|
|
if test "x$ac_found_gnutls_header" = "xno" -o "x$ac_found_gnutls_lib" = "xno" ; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_WARN([
|
2006-02-11 10:11:10 +00:00
|
|
|
*** libgnutls was not found. You may want to get it from ftp://ftp.gnutls.org/pub/gnutls/
|
2009-06-07 16:46:53 +02:00
|
|
|
*** WeeChat will be built without GnuTLS support.])
|
2010-02-18 22:02:55 +01:00
|
|
|
enable_gnutls="no"
|
|
|
|
not_found="$not_found gnutls"
|
2009-06-07 16:46:53 +02:00
|
|
|
else
|
2010-01-24 10:47:53 +01:00
|
|
|
AC_MSG_RESULT(yes)
|
2009-06-07 16:46:53 +02:00
|
|
|
GNUTLS_CFLAGS=`pkg-config gnutls --cflags`
|
|
|
|
GNUTLS_LFLAGS=`pkg-config gnutls --libs`
|
2006-05-19 22:49:24 +00:00
|
|
|
AC_SUBST(GNUTLS_CFLAGS)
|
|
|
|
AC_SUBST(GNUTLS_LFLAGS)
|
|
|
|
AC_DEFINE(HAVE_GNUTLS)
|
2008-03-23 11:41:09 +01:00
|
|
|
CFLAGS="$CFLAGS -DHAVE_GNUTLS"
|
2005-07-02 15:59:44 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_asked="$not_asked gnutls"
|
2005-06-22 18:50:24 +00:00
|
|
|
fi
|
2005-10-15 12:34:21 +00:00
|
|
|
|
2006-05-21 12:57:24 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# flock
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
enable_flock="no"
|
|
|
|
AC_CACHE_CHECK([for flock() support], ac_have_flock, [
|
2007-10-31 18:28:08 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
|
[[ #include <sys/file.h>]],
|
|
|
|
[[ flock(0, LOCK_SH); ]])],
|
2006-05-21 12:57:24 +00:00
|
|
|
[ ac_have_flock="yes" ],
|
|
|
|
[ ac_have_flock="no" ])])
|
|
|
|
|
|
|
|
if test "x$ac_have_flock" = "xyes"; then
|
2007-10-31 18:28:08 +01:00
|
|
|
enable_flock="yes"
|
|
|
|
AC_DEFINE(HAVE_FLOCK)
|
|
|
|
else
|
|
|
|
not_found="$not_found flock"
|
2006-05-21 12:57:24 +00:00
|
|
|
fi
|
|
|
|
|
2008-09-07 12:58:47 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# large file support
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
if test "x$enable_largefile" = "xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
|
|
|
|
else
|
|
|
|
not_asked="$not_asked largefile"
|
|
|
|
fi
|
|
|
|
|
2006-05-19 22:49:24 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# backtrace
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
enable_backtrace="no"
|
|
|
|
if test "x$debug" != "x0" ; then
|
|
|
|
AC_CACHE_CHECK([for execinfo.h and backtrace], ac_have_backtrace, [
|
2007-10-31 18:28:08 +01:00
|
|
|
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
|
|
|
[[ #include <execinfo.h> ]],
|
|
|
|
[[ void *trace[128]; int n = backtrace(trace, 128); ]])],
|
2006-05-19 22:49:24 +00:00
|
|
|
[ ac_have_backtrace="yes" ],
|
|
|
|
[ ac_have_backtrace="no" ])])
|
|
|
|
if test "x$ac_have_backtrace" = "xyes"; then
|
|
|
|
enable_backtrace="yes"
|
|
|
|
AC_DEFINE(HAVE_BACKTRACE,1,[glibc backtrace function])
|
2007-10-31 18:28:08 +01:00
|
|
|
else
|
|
|
|
not_found="$not_found backtrace"
|
2006-05-19 22:49:24 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2006-07-07 10:29:01 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# documentation
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2006-12-02 10:16:20 +00:00
|
|
|
msg_doc=""
|
|
|
|
|
2008-08-30 12:40:39 +02:00
|
|
|
if test "x$enable_doc" = "xyes" ; then
|
2009-05-15 23:03:35 +02:00
|
|
|
DOC_ASCIIDOC8=""
|
|
|
|
AC_CHECK_PROGS(ASCIIDOC, [asciidoc])
|
2009-06-07 18:56:38 +02:00
|
|
|
AC_CHECK_PROGS(SOURCEHIGHLIGHT, [source-highlight])
|
|
|
|
if test -n "$SOURCEHIGHLIGHT" -a -n "$ASCIIDOC"; then
|
2009-05-15 23:03:35 +02:00
|
|
|
AC_MSG_CHECKING([for asciidoc version])
|
|
|
|
asciidoc_version=`$ASCIIDOC --version 2>/dev/null`
|
|
|
|
case "${asciidoc_version}" in
|
|
|
|
asciidoc' '8*)
|
|
|
|
DOC_ASCIIDOC8="yes"
|
|
|
|
AC_MSG_RESULT([${asciidoc_version}])
|
2009-06-07 18:56:38 +02:00
|
|
|
msg_doc="asciidoc(with source-highlight) $msg_doc"
|
2009-05-28 16:07:40 +02:00
|
|
|
AC_DEFINE(DOC)
|
2009-05-15 23:03:35 +02:00
|
|
|
;;
|
|
|
|
*)
|
|
|
|
AC_MSG_RESULT([${asciidoc_version} (too old)])
|
2009-05-28 16:07:40 +02:00
|
|
|
not_found="$not_found asciidoc"
|
2009-05-15 23:03:35 +02:00
|
|
|
;;
|
|
|
|
esac
|
2009-05-28 16:07:40 +02:00
|
|
|
else
|
2010-01-24 10:47:53 +01:00
|
|
|
enable_doc="no"
|
2009-06-07 18:56:38 +02:00
|
|
|
fi
|
|
|
|
if test -z "$ASCIIDOC"; then
|
2009-05-28 16:07:40 +02:00
|
|
|
not_found="$not_found asciidoc"
|
2009-05-15 23:03:35 +02:00
|
|
|
fi
|
2009-06-07 18:56:38 +02:00
|
|
|
if test -z "$SOURCEHIGHLIGHT"; then
|
2010-01-24 10:47:53 +01:00
|
|
|
not_found="$not_found source-highlight(needed by asciidoc)"
|
2009-06-07 18:56:38 +02:00
|
|
|
fi
|
2009-05-15 23:03:35 +02:00
|
|
|
AC_SUBST(DOC_ASCIIDOC8)
|
2009-05-28 16:07:40 +02:00
|
|
|
AC_SUBST(ASCIIDOC)
|
2006-07-07 10:29:01 +00:00
|
|
|
else
|
2008-08-30 12:40:39 +02:00
|
|
|
not_asked="$not_asked doc"
|
|
|
|
msg_doc=""
|
2006-07-07 10:29:01 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# general vars
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
if test "x$prefix" = "xNONE" ; then
|
2007-10-31 18:28:08 +01:00
|
|
|
prefix="$ac_default_prefix"
|
2005-10-15 12:34:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if test "x$exec_prefix" = "xNONE" ; then
|
2007-10-31 18:28:08 +01:00
|
|
|
exec_prefix="$prefix"
|
2005-10-15 12:34:21 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
|
|
|
|
|
2006-06-28 21:50:28 +00:00
|
|
|
WEECHAT_LIBDIR=`eval eval echo ${libdir}/weechat`
|
2005-10-15 12:34:21 +00:00
|
|
|
AC_DEFINE_UNQUOTED(WEECHAT_LIBDIR, "$WEECHAT_LIBDIR")
|
|
|
|
|
2006-06-28 21:50:28 +00:00
|
|
|
WEECHAT_SHAREDIR=`eval eval echo ${datadir}/weechat`
|
2005-10-15 12:34:21 +00:00
|
|
|
AC_DEFINE_UNQUOTED(WEECHAT_SHAREDIR, "$WEECHAT_SHAREDIR")
|
|
|
|
|
|
|
|
weechat_libdir=${libdir}/weechat
|
|
|
|
AC_SUBST(weechat_libdir)
|
2006-07-30 23:25:12 +00:00
|
|
|
|
2008-06-02 16:57:31 +02:00
|
|
|
COMMON_CFLAGS="-Wall -W -Werror-implicit-function-declaration"
|
2006-07-30 23:25:12 +00:00
|
|
|
AC_MSG_CHECKING([whether we have GNU assembler])
|
|
|
|
GAS=`as --version < /dev/null 2>/dev/null | grep GNU`
|
|
|
|
if test "$GAS"; then
|
|
|
|
COMMON_CFLAGS="${COMMON_CFLAGS} -pipe"
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
2007-09-21 16:53:18 +02:00
|
|
|
|
2009-11-19 16:06:57 +01:00
|
|
|
CFLAGS=`echo $CFLAGS | sed 's/ -g / /g'`
|
2008-06-17 17:04:55 +02:00
|
|
|
CFLAGS=`echo $CFLAGS | sed 's/^-g //g'`
|
|
|
|
CFLAGS=`echo $CFLAGS | sed 's/ -g$//g'`
|
|
|
|
CFLAGS=`echo $CFLAGS | sed 's/^-g$//g'`
|
2008-02-21 17:31:59 +01:00
|
|
|
if test "x$debug" = "x0" ; then
|
2006-07-30 23:25:12 +00:00
|
|
|
CFLAGS="$COMMON_CFLAGS $CFLAGS"
|
2008-02-21 17:31:59 +01:00
|
|
|
else
|
|
|
|
CFLAGS="$COMMON_CFLAGS $CFLAGS -g -O0"
|
2004-07-02 23:19:36 +00:00
|
|
|
fi
|
|
|
|
|
2005-10-31 10:56:32 +00:00
|
|
|
LIBS="$LIBS $INTLLIBS"
|
|
|
|
|
2005-10-29 17:56:50 +00:00
|
|
|
case "$host_os" in
|
2006-05-20 18:48:13 +00:00
|
|
|
freebsd*)
|
2005-10-31 10:56:32 +00:00
|
|
|
if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
|
2007-10-31 18:28:08 +01:00
|
|
|
CFLAGS="$CFLAGS -pthread"
|
2005-10-31 10:56:32 +00:00
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS $CPPFLAGS"
|
2005-10-29 17:56:50 +00:00
|
|
|
;;
|
2005-10-30 13:17:20 +00:00
|
|
|
openbsd*)
|
2005-10-31 10:56:32 +00:00
|
|
|
if test "x$enable_python" = "xyes" ; then
|
2007-10-31 18:28:08 +01:00
|
|
|
CFLAGS="$CFLAGS -pthread"
|
2005-10-31 10:56:32 +00:00
|
|
|
fi
|
|
|
|
;;
|
2006-05-20 18:48:13 +00:00
|
|
|
netbsd*)
|
|
|
|
if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
|
2007-10-31 18:28:08 +01:00
|
|
|
CFLAGS="$CFLAGS -pthread"
|
2006-05-20 18:48:13 +00:00
|
|
|
fi
|
|
|
|
CFLAGS="$CFLAGS $CPPFLAGS"
|
2007-10-31 18:28:08 +01:00
|
|
|
;;
|
2010-01-24 10:47:53 +01:00
|
|
|
gnu*)
|
2007-10-31 18:28:08 +01:00
|
|
|
LDFLAGS="$LDFLAGS -lpthread"
|
|
|
|
;;
|
2005-10-29 17:56:50 +00:00
|
|
|
*)
|
|
|
|
;;
|
|
|
|
esac
|
2005-04-17 19:01:18 +00:00
|
|
|
|
2008-03-23 11:41:09 +01:00
|
|
|
CFLAGS="$CFLAGS -DWEECHAT_VERSION=\\\"$VERSION\\\""
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# output Makefiles
|
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
|
2010-02-18 22:02:55 +01:00
|
|
|
AM_CONDITIONAL(HAVE_GCRYPT, test "$enable_gcrypt" = "yes")
|
2008-05-04 20:24:20 +02:00
|
|
|
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
|
|
|
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
|
2006-07-30 23:25:12 +00:00
|
|
|
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
|
|
|
AM_CONDITIONAL(GUI_WXWIDGETS, test "$enable_wxwidgets" = "yes")
|
|
|
|
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
|
|
|
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "yes")
|
2007-12-03 18:03:10 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_ALIAS, test "$enable_alias" = "yes")
|
2006-07-30 23:25:12 +00:00
|
|
|
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
|
2006-11-08 07:54:33 +00:00
|
|
|
AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
|
2008-02-21 17:31:59 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_DEMO, test "$enable_demo" = "yes")
|
2007-10-31 18:28:08 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
|
2008-02-21 17:31:59 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
|
2007-11-11 14:36:34 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_LOGGER, test "$enable_logger" = "yes")
|
2008-12-10 17:08:56 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_RELAY, test "$enable_relay" = "yes")
|
2007-11-11 14:36:34 +01:00
|
|
|
AM_CONDITIONAL(PLUGIN_PERL, test "$enable_perl" = "yes")
|
|
|
|
AM_CONDITIONAL(PLUGIN_PYTHON, test "$enable_python" = "yes")
|
|
|
|
AM_CONDITIONAL(PLUGIN_RUBY, test "$enable_ruby" = "yes")
|
|
|
|
AM_CONDITIONAL(PLUGIN_LUA, test "$enable_lua" = "yes")
|
2008-10-05 19:06:46 +02:00
|
|
|
AM_CONDITIONAL(PLUGIN_TCL, test "$enable_tcl" = "yes")
|
2008-05-04 20:24:20 +02:00
|
|
|
AM_CONDITIONAL(PLUGIN_XFER, test "$enable_xfer" = "yes")
|
2008-08-30 12:40:39 +02:00
|
|
|
AM_CONDITIONAL(DOC, test "$enable_doc" = "yes")
|
2006-02-11 10:11:10 +00:00
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_OUTPUT([Makefile
|
2005-07-16 22:46:01 +00:00
|
|
|
doc/Makefile
|
2006-01-02 22:16:54 +00:00
|
|
|
doc/en/Makefile
|
2006-04-30 12:35:58 +00:00
|
|
|
doc/fr/Makefile
|
2009-09-05 16:43:16 +02:00
|
|
|
doc/pl/Makefile
|
2009-09-05 23:16:51 +02:00
|
|
|
doc/de/Makefile
|
2009-10-09 18:19:32 +02:00
|
|
|
doc/ru/Makefile
|
2009-10-18 21:17:33 +02:00
|
|
|
doc/ja/Makefile
|
2009-11-18 21:36:21 +01:00
|
|
|
doc/it/Makefile
|
2003-10-25 14:49:18 +00:00
|
|
|
src/Makefile
|
2007-10-31 18:28:08 +01:00
|
|
|
src/core/Makefile
|
2003-11-09 00:08:01 +00:00
|
|
|
src/plugins/Makefile
|
2007-12-03 18:03:10 +01:00
|
|
|
src/plugins/alias/Makefile
|
2007-11-11 14:36:34 +01:00
|
|
|
src/plugins/aspell/Makefile
|
|
|
|
src/plugins/charset/Makefile
|
2008-02-21 17:31:59 +01:00
|
|
|
src/plugins/demo/Makefile
|
2007-11-11 14:36:34 +01:00
|
|
|
src/plugins/fifo/Makefile
|
2008-02-21 17:31:59 +01:00
|
|
|
src/plugins/irc/Makefile
|
2007-11-11 14:36:34 +01:00
|
|
|
src/plugins/logger/Makefile
|
2008-12-10 17:08:56 +01:00
|
|
|
src/plugins/relay/Makefile
|
2005-10-15 12:34:21 +00:00
|
|
|
src/plugins/scripts/Makefile
|
|
|
|
src/plugins/scripts/perl/Makefile
|
|
|
|
src/plugins/scripts/python/Makefile
|
2005-10-23 11:33:39 +00:00
|
|
|
src/plugins/scripts/ruby/Makefile
|
2006-02-08 12:06:24 +00:00
|
|
|
src/plugins/scripts/lua/Makefile
|
2008-10-05 19:06:46 +02:00
|
|
|
src/plugins/scripts/tcl/Makefile
|
2008-05-04 20:24:20 +02:00
|
|
|
src/plugins/xfer/Makefile
|
2003-10-25 14:49:18 +00:00
|
|
|
src/gui/Makefile
|
|
|
|
src/gui/curses/Makefile
|
2005-04-24 11:08:22 +00:00
|
|
|
src/gui/wxwidgets/Makefile
|
2003-10-25 14:49:18 +00:00
|
|
|
src/gui/gtk/Makefile
|
2003-11-01 20:42:16 +00:00
|
|
|
src/gui/qt/Makefile
|
|
|
|
intl/Makefile
|
|
|
|
po/Makefile.in])
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# end message
|
|
|
|
# ------------------------------------------------------------------------------
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2006-02-11 10:11:10 +00:00
|
|
|
listgui=""
|
2005-01-02 13:07:19 +00:00
|
|
|
if test "x$enable_ncurses" = "xyes" ; then
|
2005-01-23 02:14:37 +00:00
|
|
|
listgui="$listgui ncurses"
|
2003-10-25 14:49:18 +00:00
|
|
|
fi
|
2005-04-24 11:08:22 +00:00
|
|
|
if test "x$enable_wxwidgets" = "xyes"; then
|
2007-09-21 16:53:18 +02:00
|
|
|
listgui="$listgui wxwidgets"
|
2005-04-24 11:08:22 +00:00
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
if test "x$enable_gtk" = "xyes" ; then
|
2007-09-21 16:53:18 +02:00
|
|
|
listgui="$listgui gtk"
|
2003-10-25 14:49:18 +00:00
|
|
|
fi
|
|
|
|
if test "x$enable_qt" = "xyes" ; then
|
2007-09-21 16:53:18 +02:00
|
|
|
listgui="$listgui qt"
|
2003-10-25 14:49:18 +00:00
|
|
|
fi
|
|
|
|
|
2003-10-26 22:49:01 +00:00
|
|
|
if test "x$listgui" = "x" ; then
|
2005-05-07 09:29:26 +00:00
|
|
|
AC_MSG_ERROR([
|
|
|
|
*** No interface specified...
|
2006-02-11 10:11:10 +00:00
|
|
|
*** Please enable at least ncurses, WxWidgets, Gtk or Qt.])
|
|
|
|
fi
|
|
|
|
|
2007-10-31 18:28:08 +01:00
|
|
|
listplugins=""
|
2007-12-03 18:03:10 +01:00
|
|
|
if test "x$enable_alias" = "xyes"; then
|
|
|
|
listplugins="$listplugins alias"
|
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_aspell" = "xyes"; then
|
|
|
|
listplugins="$listplugins aspell"
|
2006-10-09 17:22:32 +00:00
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_charset" = "xyes"; then
|
|
|
|
listplugins="$listplugins charset"
|
2006-10-09 17:22:32 +00:00
|
|
|
fi
|
2008-02-21 17:31:59 +01:00
|
|
|
if test "x$enable_demo" = "xyes"; then
|
|
|
|
listplugins="$listplugins demo"
|
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_fifo" = "xyes"; then
|
|
|
|
listplugins="$listplugins fifo"
|
|
|
|
fi
|
2008-02-21 17:31:59 +01:00
|
|
|
if test "x$enable_irc" = "xyes" ; then
|
|
|
|
listplugins="$listplugins irc"
|
|
|
|
fi
|
2007-11-11 14:36:34 +01:00
|
|
|
if test "x$enable_logger" = "xyes"; then
|
|
|
|
listplugins="$listplugins logger"
|
|
|
|
fi
|
2008-12-10 17:08:56 +01:00
|
|
|
if test "x$enable_relay" = "xyes"; then
|
|
|
|
listplugins="$listplugins relay"
|
|
|
|
fi
|
2007-11-11 14:36:34 +01:00
|
|
|
if test "x$enable_perl" = "xyes"; then
|
|
|
|
listplugins="$listplugins perl($PERL_VERSION)"
|
|
|
|
fi
|
|
|
|
if test "x$enable_python" = "xyes"; then
|
|
|
|
listplugins="$listplugins python($PYTHON_VERSION)"
|
|
|
|
fi
|
|
|
|
if test "x$enable_ruby" = "xyes"; then
|
|
|
|
listplugins="$listplugins ruby($RUBY_VERSION)"
|
|
|
|
fi
|
|
|
|
if test "x$enable_lua" = "xyes"; then
|
|
|
|
listplugins="$listplugins lua($LUA_VERSION)"
|
|
|
|
fi
|
2008-10-05 19:06:46 +02:00
|
|
|
if test "x$enable_tcl" = "xyes"; then
|
2009-09-03 11:26:03 +02:00
|
|
|
listplugins="$listplugins tcl($TCL_VERSION)"
|
2008-10-05 19:06:46 +02:00
|
|
|
fi
|
2008-05-04 20:24:20 +02:00
|
|
|
if test "x$enable_xfer" = "xyes"; then
|
|
|
|
listplugins="$listplugins xfer"
|
|
|
|
fi
|
2006-10-09 17:22:32 +00:00
|
|
|
|
2007-10-31 18:28:08 +01:00
|
|
|
listoptional=""
|
2010-02-18 22:02:55 +01:00
|
|
|
if test "x$enable_gcrypt" = "xyes"; then
|
|
|
|
listoptional="$listoptional gcrypt"
|
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_gnutls" = "xyes"; then
|
|
|
|
listoptional="$listoptional gnutls"
|
|
|
|
fi
|
|
|
|
if test "x$enable_flock" = "xyes"; then
|
|
|
|
listoptional="$listoptional flock"
|
|
|
|
fi
|
2008-09-07 12:58:47 +00:00
|
|
|
if test "x$enable_largefile" = "xyes"; then
|
|
|
|
listoptional="$listoptional largefile"
|
|
|
|
fi
|
2007-10-31 18:28:08 +01:00
|
|
|
if test "x$enable_backtrace" = "xyes"; then
|
|
|
|
listoptional="$listoptional backtrace"
|
2006-10-09 17:22:32 +00:00
|
|
|
fi
|
|
|
|
|
2007-10-31 18:28:08 +01:00
|
|
|
msg_debug="no"
|
2008-02-21 17:31:59 +01:00
|
|
|
if test "x$debug" != "x0"; then
|
2007-10-31 18:28:08 +01:00
|
|
|
msg_debug="yes"
|
|
|
|
fi
|
2006-10-09 17:22:32 +00:00
|
|
|
|
2008-01-30 17:49:45 +01:00
|
|
|
if test "x$msg_doc" = "x"; then
|
|
|
|
msg_doc="no"
|
|
|
|
else
|
|
|
|
msg_doc="yes: $msg_doc"
|
|
|
|
fi
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
echo ""
|
2007-10-31 18:28:08 +01:00
|
|
|
echo "Enabled features:"
|
|
|
|
echo " Interfaces........... :$listgui"
|
|
|
|
echo " Plugins.............. :$listplugins"
|
|
|
|
echo " Optional features.... :$listoptional"
|
|
|
|
echo " Compile with debug... : $msg_debug"
|
|
|
|
echo " Documentation........ : $msg_doc"
|
|
|
|
|
|
|
|
if test "x$not_asked" != "x" || test "x$not_found" != "x"; then
|
|
|
|
echo ""
|
|
|
|
echo "Disabled features:"
|
|
|
|
if test "x$not_asked" != "x"; then
|
|
|
|
echo " - not asked:$not_asked"
|
|
|
|
fi
|
|
|
|
if test "x$not_found" != "x"; then
|
|
|
|
echo " - not found:$not_found"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2005-10-15 12:34:21 +00:00
|
|
|
echo ""
|
|
|
|
eval echo "WeeChat will be installed in $bindir."
|
|
|
|
echo ""
|
|
|
|
echo "configure complete, now type 'make' to build WeeChat $VERSION"
|
|
|
|
echo ""
|