Auto-detect all components, and compile if found by default
This commit is contained in:
parent
321a8a65ad
commit
e7fd1a0cb7
246
configure.in
246
configure.in
@ -100,26 +100,17 @@ AC_ARG_ENABLE(wxwidgets, [ --enable-wxwidgets Turn on WxWidgets interf
|
|||||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk interface (default=no Gtk)],enable_gtk=$enableval,enable_gtk=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(qt, [ --enable-qt Turn on Qt interface (default=no Qt)],enable_qt=$enableval,enable_qt=no)
|
||||||
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=plugins enabled)],enable_plugins=$enableval,enable_plugins=yes)
|
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=plugins enabled)],enable_plugins=$enableval,enable_plugins=yes)
|
||||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl script plugin (default=no Perl plugin)],enable_perl=$enableval,enable_perl=no)
|
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, [ --enable-python Turn on Python script plugin (default=no Python plugin)],enable_python=$enableval,enable_python=no)
|
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, [ --enable-ruby Turn on Ruby script plugin (default=no Ruby script)],enable_ruby=$enableval,enable_ruby=no)
|
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, [ --enable-lua Turn on Lua script plugin (default=no Lua script)],enable_lua=$enableval,enable_lua=no)
|
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-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-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_WITH(lua-suffix, [ --with-lua-suffix=ARG Lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
|
||||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||||
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_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||||
|
|
||||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
not_found=""
|
||||||
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(PLUGINS, test "$enable_plugins" = "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(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# GUI
|
# GUI
|
||||||
@ -128,14 +119,17 @@ AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
|||||||
if test "x$enable_ncurses" = "xyes" ; then
|
if test "x$enable_ncurses" = "xyes" ; then
|
||||||
if test "$LIBNCURSESW_FOUND" = "0" ; then
|
if test "$LIBNCURSESW_FOUND" = "0" ; then
|
||||||
if test "$LIBNCURSES_FOUND" = "0" ; then
|
if test "$LIBNCURSES_FOUND" = "0" ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** ncurses library not found!
|
*** ncurses library not found!
|
||||||
*** Please install ncurses library or run ./configure with --disable-ncurses parameter.])
|
*** WeeChat will be built without ncurses support.])
|
||||||
fi
|
enable_ncurses="no"
|
||||||
|
not_found="$not_found ncurses"
|
||||||
|
else
|
||||||
AC_MSG_WARN([
|
AC_MSG_WARN([
|
||||||
*** ncursesw library not found! Falling back to "ncurses"
|
*** ncursesw library not found! Falling back to "ncurses"
|
||||||
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
||||||
NCURSES_LIBS="-lncurses"
|
NCURSES_LIBS="-lncurses"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
NCURSES_LIBS="-lncursesw"
|
NCURSES_LIBS="-lncursesw"
|
||||||
AC_CHECK_HEADERS(ncursesw/curses.h)
|
AC_CHECK_HEADERS(ncursesw/curses.h)
|
||||||
@ -171,12 +165,17 @@ fi
|
|||||||
if test "x$enable_gtk" = "xyes" ; then
|
if test "x$enable_gtk" = "xyes" ; then
|
||||||
AM_PATH_GTK_2_0(2.4.0, LIBGTK_FOUND=1, LIBGTK_FOUND=0)
|
AM_PATH_GTK_2_0(2.4.0, LIBGTK_FOUND=1, LIBGTK_FOUND=0)
|
||||||
if test "$LIBGTK_FOUND" = "0" ; then
|
if test "$LIBGTK_FOUND" = "0" ; then
|
||||||
AC_MSG_ERROR([Gtk library not found! Install Gtk library (2.4 or higher) or run ./configure without --enable-gtk parameter.])
|
AC_MSG_WARN([
|
||||||
fi
|
*** 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`
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
||||||
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -190,40 +189,45 @@ if test "x$enable_perl" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(PERL, perl perl5)
|
AC_PATH_PROGS(PERL, perl perl5)
|
||||||
if test -z $PERL ; then
|
if test -z $PERL ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Perl must be installed on your system
|
*** Perl must be installed on your system but perl interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
Please check that perl is in path, or install
|
enable_perl="no"
|
||||||
it with your software package manager.])
|
not_found="$not_found perl"
|
||||||
fi
|
else
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Perl headers files)
|
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`
|
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
|
if test "x$PERL_HEADER_TEST" = "x0" ; then
|
||||||
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Perl headers couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Perl library)
|
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`
|
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`
|
||||||
|
|
||||||
if test "x$PERL_LIB_TEST" = "x0" ; then
|
if test "x$PERL_LIB_TEST" = "x0" ; then
|
||||||
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
|
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Perl library couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Perl library couldn't be found in your system.
|
||||||
|
*** 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([
|
||||||
|
*** Perl headers couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_perl" = "xyes" ; then
|
||||||
AC_SUBST(PERL_CFLAGS)
|
AC_SUBST(PERL_CFLAGS)
|
||||||
AC_SUBST(PERL_LFLAGS)
|
AC_SUBST(PERL_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_PERL)
|
AC_DEFINE(PLUGIN_PERL)
|
||||||
@ -234,14 +238,13 @@ if test "x$enable_python" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(PYTHON, python python2.4 python2.3 python2.2)
|
AC_PATH_PROGS(PYTHON, python python2.4 python2.3 python2.2)
|
||||||
if test -z $PYTHON ; then
|
if test -z $PYTHON ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Python must be installed on your system
|
*** Python must be installed on your system but python interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
*** Please check that python is in path, or install
|
enable_python="no"
|
||||||
*** it with your software package manager.])
|
not_found="$not_found python"
|
||||||
fi
|
else
|
||||||
|
|
||||||
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
||||||
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
|
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')"`
|
PYTHON_INCLUDE=`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
|
||||||
@ -249,30 +252,39 @@ if test "x$enable_python" = "xyes" ; then
|
|||||||
AC_MSG_CHECKING(for Python header files)
|
AC_MSG_CHECKING(for Python header files)
|
||||||
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
||||||
PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
|
PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Python header files couldn't be found in your system.
|
|
||||||
*** Try to install them with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
PYTHON_LIB=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
|
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')"`
|
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)
|
AC_MSG_CHECKING(for Python library)
|
||||||
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
|
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
|
elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Python library couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Python library couldn't be found in your system.
|
||||||
|
*** 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([
|
||||||
|
*** Python header files couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_python" = "xyes" ; then
|
||||||
AC_SUBST(PYTHON_CFLAGS)
|
AC_SUBST(PYTHON_CFLAGS)
|
||||||
AC_SUBST(PYTHON_LFLAGS)
|
AC_SUBST(PYTHON_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_PYTHON)
|
AC_DEFINE(PLUGIN_PYTHON)
|
||||||
@ -283,28 +295,31 @@ if test "x$enable_ruby" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
||||||
if test -z $RUBY ; then
|
if test -z $RUBY ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Ruby must be installed on your system
|
*** Ruby must be installed on your system but ruby interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
*** Please check that ruby is in path, or install
|
enable_ruby="no"
|
||||||
*** it with your software package manager.])
|
not_found="$not_found ruby"
|
||||||
fi
|
else
|
||||||
|
|
||||||
RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Ruby header files)
|
AC_MSG_CHECKING(for Ruby header files)
|
||||||
if test -r "$RUBY_INCLUDE/ruby.h"; then
|
if test -r "$RUBY_INCLUDE/ruby.h"; then
|
||||||
RUBY_CFLAGS="-I$RUBY_INCLUDE"
|
RUBY_CFLAGS="-I$RUBY_INCLUDE"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Ruby header files couldn't be found in your system.
|
*** Ruby header files couldn't be found in your system.
|
||||||
*** Try to install them with your software package manager.])
|
*** 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
|
fi
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_ruby" = "xyes" ; then
|
||||||
AC_SUBST(RUBY_CFLAGS)
|
AC_SUBST(RUBY_CFLAGS)
|
||||||
AC_SUBST(RUBY_LFLAGS)
|
AC_SUBST(RUBY_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_RUBY)
|
AC_DEFINE(PLUGIN_RUBY)
|
||||||
@ -383,19 +398,23 @@ if test "x$enable_lua" = "xyes" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Lua (>=5.0) headers and librairies couldn't be found in your system.
|
|
||||||
*** Try to install liblua, liblualib and liblua-dev
|
|
||||||
*** Try to install them with your software package manager.])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(found)
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
LFLAGS="$ac_save_LFLAGS"
|
LFLAGS="$ac_save_LFLAGS"
|
||||||
|
|
||||||
|
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Lua (>=5.0) headers and librairies couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_lua" = "xyes" ; then
|
||||||
AC_SUBST(LUA_CFLAGS)
|
AC_SUBST(LUA_CFLAGS)
|
||||||
AC_SUBST(LUA_LFLAGS)
|
AC_SUBST(LUA_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_LUA)
|
AC_DEFINE(PLUGIN_LUA)
|
||||||
@ -407,17 +426,23 @@ if test "x$enable_plugins" = "xyes" ; then
|
|||||||
AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
||||||
if test "$LIBDL_FOUND" = "yes"; then
|
if test "$LIBDL_FOUND" = "yes"; then
|
||||||
PLUGINS_LIBS="-ldl"
|
PLUGINS_LIBS="-ldl"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** "dl" library (dynamic library loader) couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager or disable plugins.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AC_DEFINE(PLUGINS)
|
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"
|
||||||
|
not_found="$not_found plugins"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(PLUGINS_LIBS)
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# gnutls
|
# gnutls
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -425,8 +450,7 @@ AC_SUBST(PLUGINS_LIBS)
|
|||||||
if test "x$enable_gnutls" = "xyes" ; then
|
if test "x$enable_gnutls" = "xyes" ; then
|
||||||
found_gnutls="no"
|
found_gnutls="no"
|
||||||
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
|
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
|
||||||
*** libgnutls was not found. You may want to get it from
|
*** libgnutls was not found. You may want to get it from ftp://ftp.gnutls.org/pub/gnutls/
|
||||||
*** ftp://ftp.gnutls.org/pub/gnutls/
|
|
||||||
*** WeeChat will be built without GnuTLS support.]]))
|
*** WeeChat will be built without GnuTLS support.]]))
|
||||||
if test "x$found_gnutls" = "xyes" ; then
|
if test "x$found_gnutls" = "xyes" ; then
|
||||||
GNUTLS_CFLAGS=`libgnutls-config --cflags`
|
GNUTLS_CFLAGS=`libgnutls-config --cflags`
|
||||||
@ -436,6 +460,7 @@ if test "x$enable_gnutls" = "xyes" ; then
|
|||||||
AC_DEFINE(HAVE_GNUTLS)
|
AC_DEFINE(HAVE_GNUTLS)
|
||||||
else
|
else
|
||||||
enable_gnutls="no"
|
enable_gnutls="no"
|
||||||
|
not_found="$not_found gnutls"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -503,6 +528,17 @@ esac
|
|||||||
# output Makefiles
|
# output Makefiles
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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(PLUGINS, test "$enable_plugins" = "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(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||||
|
|
||||||
AC_OUTPUT([Makefile
|
AC_OUTPUT([Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/fr/Makefile
|
doc/fr/Makefile
|
||||||
@ -528,7 +564,7 @@ AC_OUTPUT([Makefile
|
|||||||
# end message
|
# end message
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
listgui=
|
listgui=""
|
||||||
if test "x$enable_ncurses" = "xyes" ; then
|
if test "x$enable_ncurses" = "xyes" ; then
|
||||||
listgui="$listgui ncurses"
|
listgui="$listgui ncurses"
|
||||||
fi
|
fi
|
||||||
@ -545,7 +581,13 @@ fi
|
|||||||
if test "x$listgui" = "x" ; then
|
if test "x$listgui" = "x" ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
*** No interface specified...
|
*** No interface specified...
|
||||||
*** Please specify at least ncurses, WxWidgets, Gtk or Qt.])
|
*** Please enable at least ncurses, WxWidgets, Gtk or Qt.])
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
msg_debug_compiler="no"
|
msg_debug_compiler="no"
|
||||||
@ -558,15 +600,15 @@ if test "x$debug" = "x2" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Interfaces.................................... :$listgui"
|
echo "Interfaces........................ :$listgui"
|
||||||
echo "Build with GNUtls support..................... : $enable_gnutls"
|
echo "Build with GNUtls support......... : $enable_gnutls"
|
||||||
echo "Build with Plugin support..................... : $enable_plugins"
|
echo "Build with Plugin support......... : $enable_plugins"
|
||||||
echo " Perl plugin..................... : $enable_perl"
|
echo " Perl plugin......... : $enable_perl"
|
||||||
echo " Python plugin................... : $enable_python"
|
echo " Python plugin....... : $enable_python"
|
||||||
echo " Ruby plugin..................... : $enable_ruby"
|
echo " Ruby plugin......... : $enable_ruby"
|
||||||
echo " Lua plugin...................... : $enable_lua"
|
echo " Lua plugin.......... : $enable_lua"
|
||||||
echo "Compile with debug info....................... : $msg_debug_compiler"
|
echo "Compile with debug info........... : $msg_debug_compiler"
|
||||||
echo "Print debugging messages...................... : $msg_debug_verbose"
|
echo "Print debugging messages.......... : $msg_debug_verbose"
|
||||||
echo ""
|
echo ""
|
||||||
eval echo "WeeChat will be installed in $bindir."
|
eval echo "WeeChat will be installed in $bindir."
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -100,26 +100,17 @@ AC_ARG_ENABLE(wxwidgets, [ --enable-wxwidgets Turn on WxWidgets interf
|
|||||||
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk interface (default=no Gtk)],enable_gtk=$enableval,enable_gtk=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(qt, [ --enable-qt Turn on Qt interface (default=no Qt)],enable_qt=$enableval,enable_qt=no)
|
||||||
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=plugins enabled)],enable_plugins=$enableval,enable_plugins=yes)
|
AC_ARG_ENABLE(plugins, [ --disable-plugins Turn off plugins support (default=plugins enabled)],enable_plugins=$enableval,enable_plugins=yes)
|
||||||
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl script plugin (default=no Perl plugin)],enable_perl=$enableval,enable_perl=no)
|
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, [ --enable-python Turn on Python script plugin (default=no Python plugin)],enable_python=$enableval,enable_python=no)
|
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, [ --enable-ruby Turn on Ruby script plugin (default=no Ruby script)],enable_ruby=$enableval,enable_ruby=no)
|
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, [ --enable-lua Turn on Lua script plugin (default=no Lua script)],enable_lua=$enableval,enable_lua=no)
|
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-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-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_WITH(lua-suffix, [ --with-lua-suffix=ARG Lua is suffixed with ARG (default=autodetect)],lua_suffix=$withval,lua_suffix='')
|
||||||
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
AC_ARG_ENABLE(gnutls, [ --disable-gnutls Turn off gnutls support (default=compiled if found)],enable_gnutls=$enableval,enable_gnutls=yes)
|
||||||
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_WITH(debug, [ --with-debug Debugging: 0=no debug, 1=debug compilation, 2=debug compilation + verbose msgs (default=1)],debug=$withval,debug=1)
|
||||||
|
|
||||||
AM_CONDITIONAL(GUI_NCURSES, test "$enable_ncurses" = "yes")
|
not_found=""
|
||||||
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(PLUGINS, test "$enable_plugins" = "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(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# GUI
|
# GUI
|
||||||
@ -128,14 +119,17 @@ AM_CONDITIONAL(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
|||||||
if test "x$enable_ncurses" = "xyes" ; then
|
if test "x$enable_ncurses" = "xyes" ; then
|
||||||
if test "$LIBNCURSESW_FOUND" = "0" ; then
|
if test "$LIBNCURSESW_FOUND" = "0" ; then
|
||||||
if test "$LIBNCURSES_FOUND" = "0" ; then
|
if test "$LIBNCURSES_FOUND" = "0" ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** ncurses library not found!
|
*** ncurses library not found!
|
||||||
*** Please install ncurses library or run ./configure with --disable-ncurses parameter.])
|
*** WeeChat will be built without ncurses support.])
|
||||||
fi
|
enable_ncurses="no"
|
||||||
|
not_found="$not_found ncurses"
|
||||||
|
else
|
||||||
AC_MSG_WARN([
|
AC_MSG_WARN([
|
||||||
*** ncursesw library not found! Falling back to "ncurses"
|
*** ncursesw library not found! Falling back to "ncurses"
|
||||||
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
*** Be careful, UTF-8 display may not work properly if your locale is UTF-8.])
|
||||||
NCURSES_LIBS="-lncurses"
|
NCURSES_LIBS="-lncurses"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
NCURSES_LIBS="-lncursesw"
|
NCURSES_LIBS="-lncursesw"
|
||||||
AC_CHECK_HEADERS(ncursesw/curses.h)
|
AC_CHECK_HEADERS(ncursesw/curses.h)
|
||||||
@ -171,12 +165,17 @@ fi
|
|||||||
if test "x$enable_gtk" = "xyes" ; then
|
if test "x$enable_gtk" = "xyes" ; then
|
||||||
AM_PATH_GTK_2_0(2.4.0, LIBGTK_FOUND=1, LIBGTK_FOUND=0)
|
AM_PATH_GTK_2_0(2.4.0, LIBGTK_FOUND=1, LIBGTK_FOUND=0)
|
||||||
if test "$LIBGTK_FOUND" = "0" ; then
|
if test "$LIBGTK_FOUND" = "0" ; then
|
||||||
AC_MSG_ERROR([Gtk library not found! Install Gtk library (2.4 or higher) or run ./configure without --enable-gtk parameter.])
|
AC_MSG_WARN([
|
||||||
fi
|
*** 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`
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
||||||
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
||||||
AC_SUBST(GTK_CFLAGS)
|
AC_SUBST(GTK_CFLAGS)
|
||||||
AC_SUBST(GTK_LIBS)
|
AC_SUBST(GTK_LIBS)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -190,40 +189,45 @@ if test "x$enable_perl" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(PERL, perl perl5)
|
AC_PATH_PROGS(PERL, perl perl5)
|
||||||
if test -z $PERL ; then
|
if test -z $PERL ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Perl must be installed on your system
|
*** Perl must be installed on your system but perl interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
Please check that perl is in path, or install
|
enable_perl="no"
|
||||||
it with your software package manager.])
|
not_found="$not_found perl"
|
||||||
fi
|
else
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Perl headers files)
|
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`
|
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
|
if test "x$PERL_HEADER_TEST" = "x0" ; then
|
||||||
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
PERL_CFLAGS=`$PERL -MExtUtils::Embed -e ccopts`
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Perl headers couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Perl library)
|
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`
|
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`
|
||||||
|
|
||||||
if test "x$PERL_LIB_TEST" = "x0" ; then
|
if test "x$PERL_LIB_TEST" = "x0" ; then
|
||||||
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
|
PERL_LFLAGS=`$PERL -MExtUtils::Embed -e ldopts`
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Perl library couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Perl library couldn't be found in your system.
|
||||||
|
*** 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([
|
||||||
|
*** Perl headers couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_perl" = "xyes" ; then
|
||||||
AC_SUBST(PERL_CFLAGS)
|
AC_SUBST(PERL_CFLAGS)
|
||||||
AC_SUBST(PERL_LFLAGS)
|
AC_SUBST(PERL_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_PERL)
|
AC_DEFINE(PLUGIN_PERL)
|
||||||
@ -234,14 +238,13 @@ if test "x$enable_python" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(PYTHON, python python2.4 python2.3 python2.2)
|
AC_PATH_PROGS(PYTHON, python python2.4 python2.3 python2.2)
|
||||||
if test -z $PYTHON ; then
|
if test -z $PYTHON ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Python must be installed on your system
|
*** Python must be installed on your system but python interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
*** Please check that python is in path, or install
|
enable_python="no"
|
||||||
*** it with your software package manager.])
|
not_found="$not_found python"
|
||||||
fi
|
else
|
||||||
|
|
||||||
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
PYTHON_SYSPREFIX=`$PYTHON -c 'import sys; print "%s" % sys.prefix'`
|
||||||
PYTHON_VERSION=`$PYTHON -c 'import sys ; print sys.version[[:3]]'`
|
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')"`
|
PYTHON_INCLUDE=`$PYTHON -c "import distutils.sysconfig,string; print distutils.sysconfig.get_config_var('CONFINCLUDEPY')"`
|
||||||
@ -249,30 +252,39 @@ if test "x$enable_python" = "xyes" ; then
|
|||||||
AC_MSG_CHECKING(for Python header files)
|
AC_MSG_CHECKING(for Python header files)
|
||||||
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
if test -r "$PYTHON_INCLUDE/Python.h"; then
|
||||||
PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
|
PYTHON_CFLAGS="-I$PYTHON_INCLUDE"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Python header files couldn't be found in your system.
|
|
||||||
*** Try to install them with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
PYTHON_LIB=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBPL')"`
|
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')"`
|
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)
|
AC_MSG_CHECKING(for Python library)
|
||||||
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
|
if test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.so"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
|
elif test -r "$PYTHON_LIB/libpython$PYTHON_VERSION.a"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_LIB $PYTHON_LFLAGS"
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
elif test -r "$PYTHON_SYSPREFIX/lib/libpython$PYTHON_VERSION.so"; then
|
||||||
PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
|
PYTHON_LFLAGS="-L$PYTHON_SYSPREFIX/lib/ $PYTHON_LFLAGS"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Python library couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager.])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Python library couldn't be found in your system.
|
||||||
|
*** 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([
|
||||||
|
*** Python header files couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_python" = "xyes" ; then
|
||||||
AC_SUBST(PYTHON_CFLAGS)
|
AC_SUBST(PYTHON_CFLAGS)
|
||||||
AC_SUBST(PYTHON_LFLAGS)
|
AC_SUBST(PYTHON_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_PYTHON)
|
AC_DEFINE(PLUGIN_PYTHON)
|
||||||
@ -283,28 +295,31 @@ if test "x$enable_ruby" = "xyes" ; then
|
|||||||
|
|
||||||
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
AC_PATH_PROGS(RUBY, ruby ruby1.8 ruby1.9)
|
||||||
if test -z $RUBY ; then
|
if test -z $RUBY ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Ruby must be installed on your system
|
*** Ruby must be installed on your system but ruby interpreter couldn't be found in path.
|
||||||
*** 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.])
|
||||||
*** Please check that ruby is in path, or install
|
enable_ruby="no"
|
||||||
*** it with your software package manager.])
|
not_found="$not_found ruby"
|
||||||
fi
|
else
|
||||||
|
|
||||||
RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
RUBY_INCLUDE=`$RUBY -rrbconfig -e "puts Config::CONFIG[['archdir']]"`
|
||||||
|
|
||||||
AC_MSG_CHECKING(for Ruby header files)
|
AC_MSG_CHECKING(for Ruby header files)
|
||||||
if test -r "$RUBY_INCLUDE/ruby.h"; then
|
if test -r "$RUBY_INCLUDE/ruby.h"; then
|
||||||
RUBY_CFLAGS="-I$RUBY_INCLUDE"
|
RUBY_CFLAGS="-I$RUBY_INCLUDE"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([
|
AC_MSG_WARN([
|
||||||
*** Ruby header files couldn't be found in your system.
|
*** Ruby header files couldn't be found in your system.
|
||||||
*** Try to install them with your software package manager.])
|
*** 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
|
fi
|
||||||
AC_MSG_RESULT(found)
|
AC_MSG_RESULT(found)
|
||||||
|
|
||||||
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
RUBY_LFLAGS=`$RUBY -rrbconfig -e "puts Config::CONFIG[['LIBRUBYARG_SHARED']]"`
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_ruby" = "xyes" ; then
|
||||||
AC_SUBST(RUBY_CFLAGS)
|
AC_SUBST(RUBY_CFLAGS)
|
||||||
AC_SUBST(RUBY_LFLAGS)
|
AC_SUBST(RUBY_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_RUBY)
|
AC_DEFINE(PLUGIN_RUBY)
|
||||||
@ -383,19 +398,23 @@ if test "x$enable_lua" = "xyes" ; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** Lua (>=5.0) headers and librairies couldn't be found in your system.
|
|
||||||
*** Try to install liblua, liblualib and liblua-dev
|
|
||||||
*** Try to install them with your software package manager.])
|
|
||||||
else
|
|
||||||
AC_MSG_RESULT(found)
|
|
||||||
fi
|
|
||||||
|
|
||||||
CFLAGS="$ac_save_CFLAGS"
|
CFLAGS="$ac_save_CFLAGS"
|
||||||
CPPFLAGS="$ac_save_CPPFLAGS"
|
CPPFLAGS="$ac_save_CPPFLAGS"
|
||||||
LFLAGS="$ac_save_LFLAGS"
|
LFLAGS="$ac_save_LFLAGS"
|
||||||
|
|
||||||
|
if test "x$LUA_CFLAGS" = "x" -o "x$LUA_LFLAGS" = "x" ; then
|
||||||
|
AC_MSG_WARN([
|
||||||
|
*** Lua (>=5.0) headers and librairies couldn't be found in your system.
|
||||||
|
*** 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
|
||||||
|
AC_MSG_RESULT(found)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$enable_lua" = "xyes" ; then
|
||||||
AC_SUBST(LUA_CFLAGS)
|
AC_SUBST(LUA_CFLAGS)
|
||||||
AC_SUBST(LUA_LFLAGS)
|
AC_SUBST(LUA_LFLAGS)
|
||||||
AC_DEFINE(PLUGIN_LUA)
|
AC_DEFINE(PLUGIN_LUA)
|
||||||
@ -407,17 +426,23 @@ if test "x$enable_plugins" = "xyes" ; then
|
|||||||
AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
AC_CHECK_LIB(dl, dlopen, LIBDL_FOUND=yes, LIBDL_FOUND=no)
|
||||||
if test "$LIBDL_FOUND" = "yes"; then
|
if test "$LIBDL_FOUND" = "yes"; then
|
||||||
PLUGINS_LIBS="-ldl"
|
PLUGINS_LIBS="-ldl"
|
||||||
else
|
|
||||||
AC_MSG_ERROR([
|
|
||||||
*** "dl" library (dynamic library loader) couldn't be found in your system.
|
|
||||||
*** Try to install it with your software package manager or disable plugins.])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
AC_DEFINE(PLUGINS)
|
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"
|
||||||
|
not_found="$not_found plugins"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST(PLUGINS_LIBS)
|
|
||||||
|
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# gnutls
|
# gnutls
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
@ -425,8 +450,7 @@ AC_SUBST(PLUGINS_LIBS)
|
|||||||
if test "x$enable_gnutls" = "xyes" ; then
|
if test "x$enable_gnutls" = "xyes" ; then
|
||||||
found_gnutls="no"
|
found_gnutls="no"
|
||||||
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
|
AM_PATH_LIBGNUTLS( 1.0.0, found_gnutls=yes, AC_MSG_WARN([[
|
||||||
*** libgnutls was not found. You may want to get it from
|
*** libgnutls was not found. You may want to get it from ftp://ftp.gnutls.org/pub/gnutls/
|
||||||
*** ftp://ftp.gnutls.org/pub/gnutls/
|
|
||||||
*** WeeChat will be built without GnuTLS support.]]))
|
*** WeeChat will be built without GnuTLS support.]]))
|
||||||
if test "x$found_gnutls" = "xyes" ; then
|
if test "x$found_gnutls" = "xyes" ; then
|
||||||
GNUTLS_CFLAGS=`libgnutls-config --cflags`
|
GNUTLS_CFLAGS=`libgnutls-config --cflags`
|
||||||
@ -436,6 +460,7 @@ if test "x$enable_gnutls" = "xyes" ; then
|
|||||||
AC_DEFINE(HAVE_GNUTLS)
|
AC_DEFINE(HAVE_GNUTLS)
|
||||||
else
|
else
|
||||||
enable_gnutls="no"
|
enable_gnutls="no"
|
||||||
|
not_found="$not_found gnutls"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -503,6 +528,17 @@ esac
|
|||||||
# output Makefiles
|
# output Makefiles
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
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(PLUGINS, test "$enable_plugins" = "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(HAVE_GNUTLS, test "$enable_gnutls" = "yes")
|
||||||
|
|
||||||
AC_OUTPUT([Makefile
|
AC_OUTPUT([Makefile
|
||||||
doc/Makefile
|
doc/Makefile
|
||||||
doc/fr/Makefile
|
doc/fr/Makefile
|
||||||
@ -528,7 +564,7 @@ AC_OUTPUT([Makefile
|
|||||||
# end message
|
# end message
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
listgui=
|
listgui=""
|
||||||
if test "x$enable_ncurses" = "xyes" ; then
|
if test "x$enable_ncurses" = "xyes" ; then
|
||||||
listgui="$listgui ncurses"
|
listgui="$listgui ncurses"
|
||||||
fi
|
fi
|
||||||
@ -545,7 +581,13 @@ fi
|
|||||||
if test "x$listgui" = "x" ; then
|
if test "x$listgui" = "x" ; then
|
||||||
AC_MSG_ERROR([
|
AC_MSG_ERROR([
|
||||||
*** No interface specified...
|
*** No interface specified...
|
||||||
*** Please specify at least ncurses, WxWidgets, Gtk or Qt.])
|
*** Please enable at least ncurses, WxWidgets, Gtk or Qt.])
|
||||||
|
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
|
fi
|
||||||
|
|
||||||
msg_debug_compiler="no"
|
msg_debug_compiler="no"
|
||||||
@ -558,15 +600,15 @@ if test "x$debug" = "x2" ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Interfaces.................................... :$listgui"
|
echo "Interfaces........................ :$listgui"
|
||||||
echo "Build with GNUtls support..................... : $enable_gnutls"
|
echo "Build with GNUtls support......... : $enable_gnutls"
|
||||||
echo "Build with Plugin support..................... : $enable_plugins"
|
echo "Build with Plugin support......... : $enable_plugins"
|
||||||
echo " Perl plugin..................... : $enable_perl"
|
echo " Perl plugin......... : $enable_perl"
|
||||||
echo " Python plugin................... : $enable_python"
|
echo " Python plugin....... : $enable_python"
|
||||||
echo " Ruby plugin..................... : $enable_ruby"
|
echo " Ruby plugin......... : $enable_ruby"
|
||||||
echo " Lua plugin...................... : $enable_lua"
|
echo " Lua plugin.......... : $enable_lua"
|
||||||
echo "Compile with debug info....................... : $msg_debug_compiler"
|
echo "Compile with debug info........... : $msg_debug_compiler"
|
||||||
echo "Print debugging messages...................... : $msg_debug_verbose"
|
echo "Print debugging messages.......... : $msg_debug_verbose"
|
||||||
echo ""
|
echo ""
|
||||||
eval echo "WeeChat will be installed in $bindir."
|
eval echo "WeeChat will be installed in $bindir."
|
||||||
echo ""
|
echo ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user