2003-10-25 14:49:18 +00:00
|
|
|
# Copyright (c) 2003 FlashCode <flashcode@flashtux.org>
|
|
|
|
#
|
|
|
|
# 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
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (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
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
#
|
|
|
|
|
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ(2.56)
|
2003-11-03 22:59:16 +00:00
|
|
|
AC_INIT(WeeChat, 0.0.4-pre1, flashcode@flashtux.org)
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_CONFIG_SRCDIR([src/common/weechat.c])
|
2003-10-25 23:13:40 +00:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2003-11-03 22:59:16 +00:00
|
|
|
AM_INIT_AUTOMAKE([weechat], [0.0.4-pre1])
|
2003-10-25 14:49:18 +00:00
|
|
|
|
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_PROG_RANLIB
|
|
|
|
|
2003-11-01 20:42:16 +00:00
|
|
|
# Gettext
|
|
|
|
ALL_LINGUAS="fr"
|
|
|
|
AM_GNU_GETTEXT
|
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
# Checks for libraries.
|
2003-11-01 20:42:16 +00:00
|
|
|
AC_CHECK_LIB([curses], [initscr], LIBCURSES_FOUND=1, LIBCURSES_FOUND=0)
|
2003-10-25 14:49:18 +00:00
|
|
|
|
|
|
|
# Checks for header files.
|
|
|
|
AC_HEADER_STDC
|
|
|
|
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 unistd.h])
|
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_HEADER_TIME
|
|
|
|
AC_STRUCT_TM
|
|
|
|
|
|
|
|
# Checks for library functions.
|
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_FUNC_SELECT_ARGTYPES
|
|
|
|
AC_TYPE_SIGNAL
|
|
|
|
AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday inet_ntoa memset mkdir select setlocale socket strcasecmp strchr strdup strncasecmp strpbrk strrchr strstr uname])
|
|
|
|
|
2003-11-09 00:08:01 +00:00
|
|
|
AH_VERBATIM([DEBUG], [#undef DEBUG])
|
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
AC_ARG_ENABLE(curses, [ --disable-curses Turn off Curses interface (default=auto)],,enable_curses=yes)
|
2003-10-26 22:49:01 +00:00
|
|
|
AC_ARG_ENABLE(gtk, [ --enable-gtk Turn on Gtk+ interface (default=no)],enable_gtk=yes,enable_gtk=no)
|
|
|
|
AC_ARG_ENABLE(qt, [ --enable-qt Turn on Qt interface (default=no)],enable_qt=yes,enable_qt=no)
|
2003-11-09 00:08:01 +00:00
|
|
|
AC_ARG_ENABLE(perl, [ --enable-perl Turn on Perl plugins (default=no)],enable_perl=yes,enable_perl=no)
|
|
|
|
AC_ARG_ENABLE(debug, [ --enable-debug Turn on debugging messages (default=no)],enable_debug=yes,enable_debug=no)
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2003-11-09 00:08:01 +00:00
|
|
|
enable_plugins="no"
|
|
|
|
enable_python="no"
|
2003-10-25 14:49:18 +00:00
|
|
|
PYTHON_CFLAGS=
|
2003-11-09 00:08:01 +00:00
|
|
|
enable_ruby="no"
|
2003-10-25 14:49:18 +00:00
|
|
|
RUBY_CFLAGS=
|
|
|
|
|
2003-11-09 00:08:01 +00:00
|
|
|
AM_CONDITIONAL(GUI_CURSES, test "$enable_curses" = "yes")
|
|
|
|
AM_CONDITIONAL(GUI_GTK, test "$enable_gtk" = "yes")
|
|
|
|
AM_CONDITIONAL(GUI_QT, test "$enable_qt" = "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")
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2003-10-26 11:52:22 +00:00
|
|
|
if test "x$enable_curses" = "xyes" ; then
|
2003-11-01 20:42:16 +00:00
|
|
|
if test "$LIBCURSES_FOUND" = "0" ; then
|
|
|
|
AC_MSG_ERROR([Curses library not found! Install Curses library or run ./configure with --disable-curses parameter.])
|
|
|
|
fi
|
2003-11-09 00:08:01 +00:00
|
|
|
CURSES_LIBS="-lcurses"
|
2003-10-26 11:52:22 +00:00
|
|
|
AC_SUBST(CURSES_LIBS)
|
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2003-10-26 11:52:22 +00:00
|
|
|
if test "x$enable_gtk" = "xyes" ; then
|
2003-11-01 20:42:16 +00:00
|
|
|
#if test "$LIBGTK_FOUND" = "0" ; then
|
|
|
|
# AC_MSG_ERROR([Gtk+ library not found! Install Gtk+ (2.0 or higher) library or run ./configure without --enable-gtk parameter.])
|
|
|
|
#fi
|
2003-10-26 11:52:22 +00:00
|
|
|
GTK_CFLAGS=`pkg-config --cflags gtk+-2.0`
|
|
|
|
GTK_LIBS=`pkg-config --libs gtk+-2.0`
|
|
|
|
AC_SUBST(GTK_CFLAGS)
|
|
|
|
AC_SUBST(GTK_LIBS)
|
|
|
|
fi
|
2003-10-25 14:49:18 +00:00
|
|
|
|
2003-11-09 00:08:01 +00:00
|
|
|
PLUGIN_LIBS=
|
|
|
|
|
|
|
|
if test "x$enable_perl" = "xyes" ; then
|
|
|
|
enable_plugins="yes"
|
|
|
|
PLUGIN_LIBS="$PLUGIN_LIBS ../../plugins/perl/lib_weechat_perl.a"
|
|
|
|
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
|
|
|
|
PERL_LIBS=`perl -MExtUtils::Embed -e ldopts`
|
|
|
|
AC_SUBST(PERL_CFLAGS)
|
|
|
|
AC_SUBST(PERL_LIBS)
|
|
|
|
fi
|
|
|
|
|
|
|
|
AC_SUBST(PLUGIN_LIBS)
|
|
|
|
|
|
|
|
if test "x$enable_debug" = "xyes" ; then
|
|
|
|
AC_DEFINE(DEBUG)
|
|
|
|
fi
|
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
CFLAGS="-Wall -W -pipe -O2"
|
|
|
|
|
|
|
|
AC_OUTPUT([Makefile
|
|
|
|
src/Makefile
|
|
|
|
src/common/Makefile
|
|
|
|
src/irc/Makefile
|
2003-11-09 00:08:01 +00:00
|
|
|
src/plugins/Makefile
|
|
|
|
src/plugins/perl/Makefile
|
2003-10-25 14:49:18 +00:00
|
|
|
src/gui/Makefile
|
|
|
|
src/gui/curses/Makefile
|
|
|
|
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
|
|
|
|
|
|
|
echo
|
|
|
|
echo $PACKAGE $VERSION
|
|
|
|
|
|
|
|
listgui=
|
|
|
|
if test "x$enable_curses" = "xyes" ; then
|
|
|
|
listgui="$listgui Curses"
|
|
|
|
fi
|
|
|
|
if test "x$enable_gtk" = "xyes" ; then
|
|
|
|
listgui="$listgui Gtk+"
|
|
|
|
fi
|
|
|
|
if test "x$enable_qt" = "xyes" ; then
|
|
|
|
listgui="$listgui Qt"
|
|
|
|
fi
|
|
|
|
|
2003-10-26 22:49:01 +00:00
|
|
|
if test "x$listgui" = "x" ; then
|
|
|
|
AC_MSG_ERROR([No interface specified... Please specify at least Curses, Gtk or Qt.])
|
|
|
|
fi
|
|
|
|
|
2003-10-25 14:49:18 +00:00
|
|
|
echo
|
|
|
|
echo Interfaces.................... :$listgui
|
|
|
|
echo
|
|
|
|
echo Build with Plugin support..... : $enable_plugins
|
|
|
|
echo Build with Perl support....... : $enable_perl
|
|
|
|
echo Build with Python support..... : $enable_python
|
|
|
|
echo Build with Ruby support....... : $enable_ruby
|
|
|
|
echo
|
|
|
|
echo Print debugging messages...... : $enable_debug
|
|
|
|
echo
|
|
|
|
eval eval echo WeeChat will be installed in $bindir.
|
|
|
|
echo
|
|
|
|
echo configure complete, now type \'make\' to build WeeChat
|
|
|
|
echo
|