Modified general configure and makefiles
This commit is contained in:
parent
652a6fa47e
commit
ed8906f2e1
@ -33,16 +33,18 @@ STRING(REPLACE "\";\"" "\ " PKG_STRING ${PKG_STRING})
|
||||
|
||||
OPTION(DISABLE_NCURSES "Disable Ncurses interface")
|
||||
OPTION(ENABLE_GTK "Enable GTK interface")
|
||||
OPTION(DISABLE_IRC "Disable IRC protocol")
|
||||
OPTION(DISABLE_NLS "Disable Native Language Support")
|
||||
OPTION(DISABLE_GNUTLS "Disable SSLv3/TLS connection support")
|
||||
OPTION(DISABLE_PLUGINS "Disable Plugins support")
|
||||
OPTION(DISABLE_IRC "Disable IRC plugin")
|
||||
OPTION(DISABLE_SCRIPTS "Disable script plugins")
|
||||
OPTION(DISABLE_PERL "Disable Perl scripting language")
|
||||
OPTION(DISABLE_PYTHON "Disable Python scripting language")
|
||||
OPTION(DISABLE_RUBY "Disable Ruby scripting language")
|
||||
OPTION(DISABLE_LUA "Disable Lua scripting language")
|
||||
OPTION(DISABLE_ASPELL "Disable Aspell plugin")
|
||||
OPTION(DISABLE_CHARSET "Disable Charset plugin")
|
||||
OPTION(DISABLE_FIFO "Disable FIFO plugin")
|
||||
OPTION(DISABLE_TRIGGER "Disable Trigger plugin")
|
||||
OPTION(DISABLE_DOC "Disable Doc")
|
||||
|
||||
ADD_SUBDIRECTORY( po )
|
||||
|
389
configure.in
389
configure.in
@ -19,7 +19,7 @@
|
||||
|
||||
AC_PREREQ(2.56)
|
||||
AC_INIT(WeeChat, 0.2.7-dev, flashcode@flashtux.org)
|
||||
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
||||
AC_CONFIG_SRCDIR([src/core/weechat.c])
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
AM_INIT_AUTOMAKE([weechat], [0.2.7-dev])
|
||||
|
||||
@ -33,17 +33,15 @@ AC_CHECK_PROG(DBLATEX_FOUND, "dblatex", "yes")
|
||||
# Add some flags for some OS
|
||||
case "$host_os" in
|
||||
freebsd* | openbsd*)
|
||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
CFLAGS="$CFLAGS -I/usr/local/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/local/lib"
|
||||
;;
|
||||
netbsd*)
|
||||
CFLAGS="$CFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
CFLAGS="$CFLAGS -I/usr/pkg/include"
|
||||
LDFLAGS="$LDFLAGS -L/usr/pkg/lib"
|
||||
;;
|
||||
solaris*)
|
||||
LDFLAGS="$LDFLAGS -lsocket -lxnet"
|
||||
;;
|
||||
*)
|
||||
LDFLAGS="$LDFLAGS -lsocket -lxnet"
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -71,12 +69,12 @@ AC_STRUCT_TM
|
||||
|
||||
AC_MSG_CHECKING([for socklen_t])
|
||||
AC_CACHE_VAL(ac_cv_type_socklen_t,
|
||||
[AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>],
|
||||
[socklen_t t;],
|
||||
ac_cv_type_socklen_t=yes,
|
||||
ac_cv_type_socklen_t=no,
|
||||
[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 ],
|
||||
)])
|
||||
if test $ac_cv_type_socklen_t = no; then
|
||||
AC_DEFINE(socklen_t, int, Define to 'int' if <sys/socket.h> doesn't define.)
|
||||
@ -93,47 +91,64 @@ AC_CHECK_FUNCS([gethostbyname gethostname getsockname gettimeofday inet_ntoa mem
|
||||
AH_VERBATIM([PREFIX], [#undef PREFIX])
|
||||
AH_VERBATIM([WEECHAT_LIBDIR], [#undef WEECHAT_LIBDIR])
|
||||
AH_VERBATIM([WEECHAT_SHAREDIR], [#undef WEECHAT_SHAREDIR])
|
||||
AH_VERBATIM([PROTOCOL_IRC], [#undef PROTOCOL_IRC])
|
||||
AH_VERBATIM([PLUGINS], [#undef PLUGINS])
|
||||
AH_VERBATIM([PLUGIN_IRC], [#undef PLUGIN_IRC])
|
||||
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])
|
||||
AH_VERBATIM([PLUGIN_ASPELL], [#undef PLUGIN_ASPELL])
|
||||
AH_VERBATIM([PLUGIN_CHARSET], [#undef PLUGIN_CHARSET])
|
||||
AH_VERBATIM([PLUGIN_FIFO], [#undef PLUGIN_FIFO])
|
||||
AH_VERBATIM([PLUGIN_TRIGGER], [#undef PLUGIN_TRIGGER])
|
||||
AH_VERBATIM([HAVE_GNUTLS], [#undef HAVE_GNUTLS])
|
||||
AH_VERBATIM([HAVE_FLOCK], [#undef HAVE_FLOCK])
|
||||
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
||||
|
||||
# Arguments for ./configure
|
||||
|
||||
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=no wxwidgets)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk interface (default=no Gtk)],enable_gtk=$enableval,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no Qt)],enable_qt=$enableval,enable_qt=no)
|
||||
AC_ARG_ENABLE(irc, [ --disable-irc Turn off IRC protocol support (default=compiled)],enable_irc=$enableval,enable_irc=yes)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=plugins enabled)],enable_plugins=$enableval,enable_plugins=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)
|
||||
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='')
|
||||
AC_ARG_ENABLE(aspell, [ --disable-aspell Turn off Aspell plugin (default=compiled if found)],enable_aspell=$enableval,enable_aspell=yes)
|
||||
AC_ARG_ENABLE(charset, [ --disable-charset Turn off Charset plugin (default=compiled if found)],enable_charset=$enableval,enable_charset=yes)
|
||||
AC_ARG_WITH(doc_xsl_prefix, [ --with-doc-xsl-prefix=DIR Docbook html/chunk.xsl is in DIR (default=autodetect)],doc_xsl_prefix=$withval,doc_xsl_prefix='')
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||
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=no wxwidgets)],enable_wxwidgets=$enableval,enable_wxwidgets=no)
|
||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk interface (default=no Gtk)],enable_gtk=$enableval,enable_gtk=no)
|
||||
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no Qt)],enable_qt=$enableval,enable_qt=no)
|
||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||
AC_ARG_ENABLE(irc, [ --disable-irc Turn off IRC plugin (default=compiled)],enable_irc=$enableval,enable_irc=yes)
|
||||
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)
|
||||
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='')
|
||||
AC_ARG_ENABLE(aspell, [ --disable-aspell Turn off Aspell plugin (default=compiled if found)],enable_aspell=$enableval,enable_aspell=yes)
|
||||
AC_ARG_ENABLE(charset, [ --disable-charset Turn off Charset plugin (default=compiled if found)],enable_charset=$enableval,enable_charset=yes)
|
||||
AC_ARG_ENABLE(fifo, [ --disable-fifo Turn off Fifo plugin (default=compiled if found)],enable_fifo=$enableval,enable_fifo=yes)
|
||||
AC_ARG_ENABLE(trigger, [ --disable-trigger Turn off Trigger plugin (default=compiled if found)],enable_trigger=$enableval,enable_trigger=yes)
|
||||
AC_ARG_WITH(doc_xsl_prefix, [ --with-doc-xsl-prefix=DIR Docbook html/chunk.xsl is in DIR (default=autodetect)],doc_xsl_prefix=$withval,doc_xsl_prefix='')
|
||||
AC_ARG_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||
|
||||
not_asked=""
|
||||
not_found=""
|
||||
WEECHAT_STATIC_LIBS=""
|
||||
WEECHAT_STATIC_LIBS="$WEECHAT_STATIC_LIBS ../lib_weechat_gui_common.a"
|
||||
WEECHAT_STATIC_LIBS="$WEECHAT_STATIC_LIBS ../../common/lib_weechat_main.a"
|
||||
WEECHAT_STATIC_LIBS="$WEECHAT_STATIC_LIBS ../../protocols/lib_weechat_protocols.a"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# GUI
|
||||
# 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([
|
||||
*** "dl" library (dynamic library loader) couldn't be found in your system.
|
||||
*** Try to install it with your software package manager.])
|
||||
fi
|
||||
AC_SUBST(PLUGINS_LFLAGS)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# gui
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_ncurses" = "xyes" ; then
|
||||
@ -148,13 +163,15 @@ if test "x$enable_ncurses" = "xyes" ; then
|
||||
AC_MSG_WARN([
|
||||
*** ncursesw library not found! Falling back to "ncurses"
|
||||
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
||||
NCURSES_LIBS="-lncurses"
|
||||
NCURSES_LFLAGS="-lncurses"
|
||||
fi
|
||||
else
|
||||
NCURSES_LIBS="-lncursesw"
|
||||
NCURSES_LFLAGS="-lncursesw"
|
||||
fi
|
||||
AC_CHECK_HEADERS([ncurses.h ncursesw/curses.h])
|
||||
AC_SUBST(NCURSES_LIBS)
|
||||
AC_SUBST(NCURSES_LFLAGS)
|
||||
else
|
||||
not_asked="$not_asked ncurses"
|
||||
fi
|
||||
|
||||
#if test "x$enable_wxwidgets" = "xyes" ; then
|
||||
@ -192,28 +209,21 @@ if test "x$enable_gtk" = "xyes" ; then
|
||||
not_found="$not_found gtk"
|
||||
else
|
||||
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
||||
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
||||
GTK_LFLAGS=`pkg-config --libs gtk+-2.0`
|
||||
AC_SUBST(GTK_CFLAGS)
|
||||
AC_SUBST(GTK_LIBS)
|
||||
AC_SUBST(GTK_LFLAGS)
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked gtk"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# IRC
|
||||
# iconv
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$enable_irc" = "xyes" ; then
|
||||
WEECHAT_STATIC_LIBS="$WEECHAT_STATIC_LIBS ../../protocols/irc/lib_weechat_irc.a"
|
||||
AC_DEFINE(PROTOCOL_IRC)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# iconv
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
iconv_found="no"
|
||||
ICONV_LFLAGS=""
|
||||
|
||||
iconv_found="no"
|
||||
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")
|
||||
@ -252,26 +262,26 @@ fi
|
||||
# plugins
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
PLUGINS_LIBS=
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
WEECHAT_STATIC_LIBS="$WEECHAT_STATIC_LIBS ../../plugins/lib_weechat_plugins.a"
|
||||
else
|
||||
enable_plugins="no"
|
||||
if test "x$enable_scripts" = "xno" ; then
|
||||
enable_perl="no"
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
enable_charset="no"
|
||||
fi
|
||||
|
||||
# ----------------------------------- irc --------------------------------------
|
||||
|
||||
if test "x$enable_irc" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_IRC)
|
||||
else
|
||||
not_asked="$not_asked irc"
|
||||
fi
|
||||
|
||||
# ---------------------------------- perl --------------------------------------
|
||||
|
||||
PERL_VERSION=
|
||||
|
||||
if test "x$enable_perl" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
AC_PATH_PROGS(PERL, perl perl5)
|
||||
if test -z $PERL ; then
|
||||
AC_MSG_WARN([
|
||||
@ -311,6 +321,8 @@ if test "x$enable_perl" = "xyes" ; then
|
||||
not_found="$not_found perl"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked perl"
|
||||
fi
|
||||
|
||||
if test "x$enable_perl" = "xyes" ; then
|
||||
@ -320,11 +332,10 @@ if test "x$enable_perl" = "xyes" ; then
|
||||
fi
|
||||
|
||||
# --------------------------------- python -------------------------------------
|
||||
|
||||
PYTHON_VERSION=
|
||||
|
||||
if test "x$enable_python" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
AC_PATH_PROGS(PYTHON, python python2.5 python2.4 python2.3 python2.2)
|
||||
if test -z $PYTHON ; then
|
||||
AC_MSG_WARN([
|
||||
@ -371,6 +382,8 @@ if test "x$enable_python" = "xyes" ; then
|
||||
not_found="$not_found python"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked python"
|
||||
fi
|
||||
|
||||
if test "x$enable_python" = "xyes" ; then
|
||||
@ -380,11 +393,10 @@ if test "x$enable_python" = "xyes" ; then
|
||||
fi
|
||||
|
||||
# ---------------------------------- ruby --------------------------------------
|
||||
|
||||
RUBY_VERSION=
|
||||
|
||||
if test "x$enable_ruby" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
||||
if test -z $RUBY ; then
|
||||
AC_MSG_WARN([
|
||||
@ -410,6 +422,8 @@ if test "x$enable_ruby" = "xyes" ; then
|
||||
AC_MSG_RESULT(found)
|
||||
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked ruby"
|
||||
fi
|
||||
|
||||
if test "x$enable_ruby" = "xyes" ; then
|
||||
@ -419,11 +433,10 @@ if test "x$enable_ruby" = "xyes" ; then
|
||||
fi
|
||||
|
||||
# ---------------------------------- lua --------------------------------------
|
||||
|
||||
LUA_VERSION=
|
||||
|
||||
if test "x$enable_lua" = "xyes" ; then
|
||||
enable_plugins="yes"
|
||||
|
||||
ac_save_CPPFLAGS="$CPPFLAGS"
|
||||
ac_save_CFLAGS="$CFLAGS"
|
||||
ac_save_LDFLAGS="$LDFLAGS"
|
||||
@ -531,6 +544,8 @@ if test "x$enable_lua" = "xyes" ; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||
LDFLAGS="$ac_save_LDFLAGS"
|
||||
else
|
||||
not_asked="$not_asked lua"
|
||||
fi
|
||||
|
||||
if test "x$enable_lua" = "xyes" ; then
|
||||
@ -539,9 +554,7 @@ if test "x$enable_lua" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_LUA)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# aspell
|
||||
# ------------------------------------------------------------------------------
|
||||
# --------------------------------- aspell -------------------------------------
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
ASPELL_CFLAGS=""
|
||||
@ -563,6 +576,8 @@ if test "x$enable_aspell" = "xyes" ; then
|
||||
AC_MSG_RESULT(yes)
|
||||
ASPELL_LFLAGS="$ASPELL_LFLAGS -laspell"
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked aspell"
|
||||
fi
|
||||
|
||||
if test "x$enable_aspell" = "xyes" ; then
|
||||
@ -571,9 +586,7 @@ if test "x$enable_aspell" = "xyes" ; then
|
||||
AC_DEFINE(PLUGIN_ASPELL)
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# charset
|
||||
# ------------------------------------------------------------------------------
|
||||
# --------------------------------- charset ------------------------------------
|
||||
|
||||
if test "x$enable_charset" = "xyes" ; then
|
||||
CHARSET_CFLAGS=""
|
||||
@ -582,34 +595,32 @@ if test "x$enable_charset" = "xyes" ; then
|
||||
AC_SUBST(CHARSET_CFLAGS)
|
||||
AC_SUBST(CHARSET_LFLAGS)
|
||||
AC_DEFINE(PLUGIN_CHARSET)
|
||||
else
|
||||
not_asked="$not_asked charset"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# dynamic loader
|
||||
# ------------------------------------------------------------------------------
|
||||
# ---------------------------------- fifo --------------------------------------
|
||||
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
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_LIBS=-ldl], LIBDL_FOUND=no)
|
||||
fi
|
||||
if test "$LIBDL_FOUND" = "yes"; then
|
||||
AC_DEFINE(PLUGINS)
|
||||
AC_SUBST(PLUGINS_LIBS)
|
||||
else
|
||||
AC_MSG_WARN([
|
||||
*** "dl" library (dynamic library loader) couldn't be found in your system.
|
||||
*** Try to install it with your software package manager or disable plugins.
|
||||
*** WeeChat will be built without any plugin.])
|
||||
enable_plugins="no"
|
||||
enable_perl="no"
|
||||
enable_python="no"
|
||||
enable_ruby="no"
|
||||
enable_lua="no"
|
||||
enable_aspell="no"
|
||||
enable_charset="no"
|
||||
not_found="$not_found plugins"
|
||||
fi
|
||||
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
|
||||
|
||||
# --------------------------------- trigger ------------------------------------
|
||||
|
||||
if test "x$enable_trigger" = "xyes" ; then
|
||||
TRIGGER_CFLAGS=""
|
||||
TRIGGER_LFLAGS=""
|
||||
AC_SUBST(TRIGGER_CFLAGS)
|
||||
AC_SUBST(TRIGGER_LFLAGS)
|
||||
AC_DEFINE(PLUGIN_TRIGGER)
|
||||
else
|
||||
not_asked="$not_asked trigger"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -631,6 +642,8 @@ if test "x$enable_gnutls" = "xyes" ; then
|
||||
enable_gnutls="no"
|
||||
not_found="$not_found gnutls"
|
||||
fi
|
||||
else
|
||||
not_asked="$not_asked gnutls"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -639,16 +652,17 @@ fi
|
||||
|
||||
enable_flock="no"
|
||||
AC_CACHE_CHECK([for flock() support], ac_have_flock, [
|
||||
AC_TRY_COMPILE(
|
||||
[ #include <sys/file.h>
|
||||
],
|
||||
[ flock(0, LOCK_SH); ],
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[ #include <sys/file.h>]],
|
||||
[[ flock(0, LOCK_SH); ]])],
|
||||
[ ac_have_flock="yes" ],
|
||||
[ ac_have_flock="no" ])])
|
||||
|
||||
if test "x$ac_have_flock" = "xyes"; then
|
||||
enable_flock="yes"
|
||||
AC_DEFINE(HAVE_FLOCK)
|
||||
enable_flock="yes"
|
||||
AC_DEFINE(HAVE_FLOCK)
|
||||
else
|
||||
not_found="$not_found flock"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -658,15 +672,16 @@ fi
|
||||
enable_backtrace="no"
|
||||
if test "x$debug" != "x0" ; then
|
||||
AC_CACHE_CHECK([for execinfo.h and backtrace], ac_have_backtrace, [
|
||||
AC_TRY_COMPILE(
|
||||
[ #include <execinfo.h>
|
||||
],
|
||||
[ void *trace[128]; int n = backtrace(trace, 128); ],
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||
[[ #include <execinfo.h> ]],
|
||||
[[ void *trace[128]; int n = backtrace(trace, 128); ]])],
|
||||
[ 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])
|
||||
else
|
||||
not_found="$not_found backtrace"
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -678,6 +693,8 @@ msg_doc=""
|
||||
|
||||
if test "x$DBLATEX_FOUND" = "xyes"; then
|
||||
msg_doc="pdf $msg_doc"
|
||||
else
|
||||
not_found="$not_found doc(pdf)"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(for html/chunk.xsl)
|
||||
@ -702,6 +719,7 @@ if test "x$DOC_XSL_PREFIX" = "x"; then
|
||||
*** Docbook XSL files not found
|
||||
*** WeeChat will be built without documentation.
|
||||
*** Try ./configure --with-doc-xsl-prefix=DIR if you have DIR/html/chunk.xsl file])
|
||||
not_found="$not_found doc(html)"
|
||||
else
|
||||
AC_MSG_RESULT($DOC_XSL_PREFIX)
|
||||
AC_SUBST(DOC_XSL_PREFIX)
|
||||
@ -713,11 +731,11 @@ fi
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
if test "x$prefix" = "xNONE" ; then
|
||||
prefix="$ac_default_prefix"
|
||||
prefix="$ac_default_prefix"
|
||||
fi
|
||||
|
||||
if test "x$exec_prefix" = "xNONE" ; then
|
||||
exec_prefix="$prefix"
|
||||
exec_prefix="$prefix"
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(PREFIX, "${prefix}")
|
||||
@ -741,14 +759,9 @@ else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
|
||||
AC_SUBST(WEECHAT_STATIC_LIBS)
|
||||
|
||||
CFLAGS=`echo $CFLAGS | sed s/-g//g`
|
||||
if test "x$CFLAGS" = "x" ; then
|
||||
CFLAGS="-O2"
|
||||
fi
|
||||
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
|
||||
CFLAGS="$COMMON_CFLAGS $CFLAGS -g"
|
||||
CFLAGS="$COMMON_CFLAGS $CFLAGS -g -O0"
|
||||
else
|
||||
CFLAGS="$COMMON_CFLAGS $CFLAGS"
|
||||
fi
|
||||
@ -762,26 +775,24 @@ LIBS="$LIBS $INTLLIBS"
|
||||
case "$host_os" in
|
||||
freebsd*)
|
||||
if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
;;
|
||||
openbsd*)
|
||||
if test "x$enable_python" = "xyes" ; then
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
fi
|
||||
;;
|
||||
netbsd*)
|
||||
if test "x$enable_perl" = "xyes" -o "x$enable_python" = "xyes" ; then
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
CFLAGS="$CFLAGS -pthread"
|
||||
fi
|
||||
CFLAGS="$CFLAGS $CPPFLAGS"
|
||||
;;
|
||||
;;
|
||||
gnu*)
|
||||
if test "x$enable_plugins" = "xyes" ; then
|
||||
LDFLAGS="$LDFLAGS -lpthread"
|
||||
fi
|
||||
;;
|
||||
LDFLAGS="$LDFLAGS -lpthread"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
@ -794,14 +805,15 @@ 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")
|
||||
AM_CONDITIONAL(PROTOCOL_IRC, test "$enable_irc" = "yes")
|
||||
AM_CONDITIONAL(PLUGINS, test "$enable_plugins" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_IRC, test "$enable_irc" = "yes")
|
||||
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")
|
||||
AM_CONDITIONAL(PLUGIN_ASPELL, test "$enable_aspell" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_CHARSET, test "$enable_charset" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_FIFO, test "$enable_fifo" = "yes")
|
||||
AM_CONDITIONAL(PLUGIN_TRIGGER, test "$enable_trigger" = "yes")
|
||||
AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||
AM_CONDITIONAL(HAVE_FLOCK, test "$enable_flock" = "yes")
|
||||
AM_CONDITIONAL(DBLATEX_FOUND, test "$DBLATEX_FOUND" = "yes")
|
||||
@ -817,10 +829,9 @@ AC_OUTPUT([Makefile
|
||||
doc/sco/Makefile
|
||||
doc/sv/Makefile
|
||||
src/Makefile
|
||||
src/common/Makefile
|
||||
src/protocols/Makefile
|
||||
src/protocols/irc/Makefile
|
||||
src/core/Makefile
|
||||
src/plugins/Makefile
|
||||
src/plugins/irc/Makefile
|
||||
src/plugins/scripts/Makefile
|
||||
src/plugins/scripts/perl/Makefile
|
||||
src/plugins/scripts/python/Makefile
|
||||
@ -828,6 +839,8 @@ AC_OUTPUT([Makefile
|
||||
src/plugins/scripts/lua/Makefile
|
||||
src/plugins/aspell/Makefile
|
||||
src/plugins/charset/Makefile
|
||||
src/plugins/fifo/Makefile
|
||||
src/plugins/trigger/Makefile
|
||||
src/gui/Makefile
|
||||
src/gui/curses/Makefile
|
||||
src/gui/wxwidgets/Makefile
|
||||
@ -860,69 +873,73 @@ if test "x$listgui" = "x" ; then
|
||||
*** Please enable at least ncurses, WxWidgets, Gtk or Qt.])
|
||||
fi
|
||||
|
||||
listprotocols=""
|
||||
listplugins=""
|
||||
if test "x$enable_irc" = "xyes" ; then
|
||||
listprotocols="$listprotocols irc"
|
||||
listplugins="$listplugins irc"
|
||||
fi
|
||||
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
|
||||
if test "x$enable_aspell" = "xyes"; then
|
||||
listplugins="$listplugins aspell"
|
||||
fi
|
||||
if test "x$enable_charset" = "xyes"; then
|
||||
listplugins="$listplugins charset"
|
||||
fi
|
||||
if test "x$enable_fifo" = "xyes"; then
|
||||
listplugins="$listplugins fifo"
|
||||
fi
|
||||
if test "x$enable_trigger" = "xyes"; then
|
||||
listplugins="$listplugins trigger"
|
||||
fi
|
||||
|
||||
if test "x$listprotocols" = "x" ; then
|
||||
AC_MSG_WARN([
|
||||
*** WeeChat will be built without any protocol, is that really what you want ?])
|
||||
listoptional=""
|
||||
if test "x$enable_gnutls" = "xyes"; then
|
||||
listoptional="$listoptional gnutls"
|
||||
fi
|
||||
if test "x$enable_flock" = "xyes"; then
|
||||
listoptional="$listoptional flock"
|
||||
fi
|
||||
if test "x$enable_backtrace" = "xyes"; then
|
||||
listoptional="$listoptional backtrace"
|
||||
fi
|
||||
|
||||
if test "x$not_found" != "x" ; then
|
||||
echo ""
|
||||
echo "Following components were asked but not found, they will not be built:"
|
||||
echo "$not_found"
|
||||
fi
|
||||
|
||||
msg_debug_compiler="no"
|
||||
msg_debug_verbose="no"
|
||||
if test "x$debug" = "x1" || test "x$debug" = "x2" ; then
|
||||
msg_debug_compiler="yes"
|
||||
msg_debug="no"
|
||||
if test "x$debug" = "x1"; then
|
||||
msg_debug="yes"
|
||||
fi
|
||||
if test "x$debug" = "x2" ; then
|
||||
msg_debug_verbose="yes"
|
||||
msg_debug="yes (with verbose messages)"
|
||||
fi
|
||||
|
||||
# plugin status
|
||||
PERL_STATUS=
|
||||
if test "x$enable_perl" = "xyes"; then
|
||||
PERL_STATUS="($PERL_VERSION)"
|
||||
fi
|
||||
|
||||
PYTHON_STATUS=
|
||||
if test "x$enable_python" = "xyes"; then
|
||||
PYTHON_STATUS="($PYTHON_VERSION)"
|
||||
fi
|
||||
|
||||
RUBY_STATUS=
|
||||
if test "x$enable_ruby" = "xyes"; then
|
||||
RUBY_STATUS="($RUBY_VERSION)"
|
||||
fi
|
||||
|
||||
LUA_STATUS=
|
||||
if test "x$enable_lua" = "xyes"; then
|
||||
LUA_STATUS="($LUA_VERSION)"
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo "Interfaces........................ :$listgui"
|
||||
echo "Protocols......................... :$listprotocols"
|
||||
echo "Build with GNUtls support......... : $enable_gnutls"
|
||||
echo "Build with flock support.......... : $enable_flock"
|
||||
echo "Build with Plugin support......... : $enable_plugins"
|
||||
echo " Perl plugin......... : $enable_perl $PERL_STATUS"
|
||||
echo " Python plugin....... : $enable_python $PYTHON_STATUS"
|
||||
echo " Ruby plugin......... : $enable_ruby $RUBY_STATUS"
|
||||
echo " Lua plugin.......... : $enable_lua $LUA_STATUS"
|
||||
echo " Aspell plugin....... : $enable_aspell"
|
||||
echo " Charset plugin...... : $enable_charset"
|
||||
echo "Compile with debug info........... : $msg_debug_compiler"
|
||||
echo " Backtrace........... : $enable_backtrace"
|
||||
echo "Build doc..........................: $msg_doc"
|
||||
echo "Print debugging messages.......... : $msg_debug_verbose"
|
||||
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
|
||||
|
||||
echo ""
|
||||
eval echo "WeeChat will be installed in $bindir."
|
||||
echo ""
|
||||
|
@ -89,32 +89,20 @@ IF(ICONV_FOUND)
|
||||
ADD_DEFINITIONS( -DHAVE_ICONV )
|
||||
ENDIF(ICONV_FOUND)
|
||||
|
||||
IF(NOT DISABLE_PLUGINS)
|
||||
FIND_LIBRARY(DL_LIBRARY
|
||||
NAMES dl
|
||||
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
|
||||
)
|
||||
ADD_DEFINITIONS(-DPLUGINS)
|
||||
LIST(APPEND STATIC_LIBS weechat_plugins)
|
||||
IF(DL_LIBRARY)
|
||||
STRING(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
|
||||
LIST(APPEND EXTRA_LIBS dl)
|
||||
ENDIF(DL_LIBRARY)
|
||||
ENDIF(NOT DISABLE_PLUGINS)
|
||||
FIND_LIBRARY(DL_LIBRARY
|
||||
NAMES dl
|
||||
PATHS /lib /usr/lib /usr/libexec /usr/local/lib /usr/local/libexec
|
||||
)
|
||||
LIST(APPEND STATIC_LIBS weechat_plugins)
|
||||
IF(DL_LIBRARY)
|
||||
STRING(REGEX REPLACE "/[^/]*$" "" DL_LIBRARY_PATH "${DL_LIBRARY}")
|
||||
SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} -L${DL_LIBRARY_PATH}")
|
||||
LIST(APPEND EXTRA_LIBS dl)
|
||||
ENDIF(DL_LIBRARY)
|
||||
|
||||
ADD_SUBDIRECTORY( common )
|
||||
LIST(APPEND STATIC_LIBS weechat_main)
|
||||
ADD_SUBDIRECTORY( core )
|
||||
LIST(APPEND STATIC_LIBS weechat_core)
|
||||
|
||||
ADD_SUBDIRECTORY( protocols )
|
||||
LIST(APPEND STATIC_LIBS weechat_protocols)
|
||||
|
||||
IF(NOT DISABLE_IRC)
|
||||
LIST(APPEND STATIC_LIBS weechat_irc)
|
||||
ENDIF(NOT DISABLE_IRC)
|
||||
|
||||
IF(NOT DISABLE_PLUGINS)
|
||||
ADD_SUBDIRECTORY( plugins )
|
||||
ENDIF(NOT DISABLE_PLUGINS)
|
||||
ADD_SUBDIRECTORY( plugins )
|
||||
|
||||
ADD_SUBDIRECTORY( gui )
|
||||
|
@ -14,4 +14,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
SUBDIRS = common protocols plugins gui
|
||||
SUBDIRS = core plugins gui
|
||||
|
Loading…
x
Reference in New Issue
Block a user