17 changes: 3 additions & 14 deletions .gitignore
Expand Up @@ -7,31 +7,19 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache/
compile
ar-lib
/build-aux/
confdefs.h
conftest
conftest.c
conftest.err
config.guess
config.h.in
config.h.in~
config.h
config.log
config.status
config.sub
config.*
config-win32.h
configure
configure.tmp
depcomp
doxygen*.tmp
html/
install-sh
intl/
libtool
ltmain.sh
m4/
missing
plugins/perl/irc.pm.h
plugins/perl/xchat.pm.h
plugins/perl/hexchat.pm.h
Expand All @@ -44,6 +32,7 @@ data/man/hexchat.1
data/pkgconfig/hexchat-plugin.pc
data/misc/hexchat.appdata.xml
data/misc/hexchat.desktop
data/misc/hexchat.desktop.in
data/misc/htm.desktop
src/common/dbus/example
src/common/dbus/org.hexchat.service.service
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
@@ -1,4 +1,5 @@
sudo: false
sudo: required
dist: trusty
language: c
cache: apt
compiler: clang
Expand All @@ -23,6 +24,7 @@ addons:
- libdbus-glib-1-dev
- libglib2.0-dev
- libgtk2.0-dev
- libluajit-5.1-dev
- libnotify-dev
- libpci-dev
- libperl-dev
Expand Down
13 changes: 9 additions & 4 deletions autogen.sh
Expand Up @@ -9,10 +9,15 @@ test -z "$srcdir" && srcdir=.
exit 1
}

aclocal --install -I m4 || exit 1
glib-gettextize --force --copy || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --force --install -Wno-portability || exit 1
if [ "$1" = "--copy" ]; then
shift
aclocal --force --install || exit 1
intltoolize --force --copy --automake || exit 1
autoreconf --force --install --include=m4 -Wno-portability || exit 1
else
intltoolize --automake || exit 1
autoreconf --install --symlink --include=m4 -Wno-portability || exit 1
fi

if [ "$NOCONFIGURE" = "" ]; then
$srcdir/configure "$@" || exit 1
Expand Down
50 changes: 46 additions & 4 deletions configure.ac
@@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.

AC_INIT([HexChat],[2.12.0])
AC_INIT([HexChat],[2.12.1])

AC_PREREQ([2.64])
AC_COPYRIGHT([Copyright (C) 1998-2010 Peter Zelezny])
Expand All @@ -9,6 +9,7 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([build-aux])

AM_INIT_AUTOMAKE([1.11.1 dist-xz no-dist-gzip subdir-objects no-define foreign])
AM_SILENT_RULES([yes])
Expand Down Expand Up @@ -117,6 +118,10 @@ AC_ARG_ENABLE(perl,
[AS_HELP_STRING([--disable-perl],[don\'t build the perl plugin])],
perl=$enableval, perl=yes)

AC_ARG_ENABLE(lua,
[AS_HELP_STRING([--disable-lua],[don\'t build the lua plugin])],
lua=$enableval, lua=yes)

AC_ARG_ENABLE(perl_old,
[AS_HELP_STRING([--disable-perl_old],[no backwards compatibility for perl plugin])],
perl_old=$enableval, perl_old=yes)
Expand Down Expand Up @@ -185,11 +190,11 @@ dnl *********************************************************************
dnl ** GLIB *************************************************************
dnl *********************************************************************

AM_PATH_GLIB_2_0([2.32.0], [], [AC_MSG_ERROR([Glib not found!])], [gmodule gobject gio])
AM_PATH_GLIB_2_0([2.34.0], [], [AC_MSG_ERROR([Glib not found!])], [gmodule gobject gio])
COMMON_CFLAGS="$GLIB_CFLAGS -DG_DISABLE_SINGLE_INCLUDES"
COMMON_LIBS="$GLIB_LIBS"
AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_32], [Dont warn using older APIs])
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_32], [Prevents using newer APIs])
AC_DEFINE([GLIB_VERSION_MIN_REQUIRED], [GLIB_VERSION_2_34], [Dont warn using older APIs])
AC_DEFINE([GLIB_VERSION_MAX_ALLOWED], [GLIB_VERSION_2_34], [Prevents using newer APIs])

dnl *********************************************************************
dnl ** GTK **************************************************************
Expand Down Expand Up @@ -217,6 +222,40 @@ AS_IF([test "x$_gdk_tgt" = xquartz], [
])
])


dnl *********************************************************************
dnl ** Lua **************************************************************
dnl *********************************************************************

AS_IF([test "$lua" = yes], [
AC_MSG_CHECKING(for plugin interface used by lua)
AS_IF([test "$plugin" = yes], [
AC_MSG_RESULT([yes])
m4_define_default([_LUA_LIST], [luajit lua lua5.3 lua53 lua5.2 lua52 lua5.1 lua51])
AC_ARG_VAR([LUA], [The Lua pkgconfig name, e.g. luajit or lua5.2])
AS_IF([test "x$LUA" = 'x'], [
for lua_var in _LUA_LIST; do
$PKG_CONFIG --exists $lua_var || continue
LUA=$lua_var
break
done
AS_IF([test "x$LUA" = 'x'], [
AC_MSG_ERROR([Failed to find lua])
])
])
PKG_CHECK_MODULES([LUA], $LUA, [
AC_SUBST([LUA_CFLAGS])
AC_SUBST([LUA_LIBS])
])
], [
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for lua])
lua=no
])
])

dnl *********************************************************************
dnl ** PERL *************************************************************
dnl *********************************************************************
Expand Down Expand Up @@ -563,6 +602,7 @@ AM_CONDITIONAL(USE_LIBCANBERRA, test "x$libcanberra" = "xyes")
AM_CONDITIONAL(DO_TEXT, test "x$textfe" = "xyes")
AM_CONDITIONAL(DO_GTK, test "x$gtkfe" = "xyes")
AM_CONDITIONAL(DO_PERL, test "x$perl" = "xyes")
AM_CONDITIONAL(DO_LUA, test "x$lua" = "xyes")
AM_CONDITIONAL(DO_PYTHON, test "x$python" != "xno")
AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
AM_CONDITIONAL(DO_CHECKSUM, test "x$checksum" = "xyes")
Expand Down Expand Up @@ -715,6 +755,7 @@ src/htm/Makefile
src/htm/thememan
osx/Info.plist
plugins/Makefile
plugins/lua/Makefile
plugins/python/Makefile
plugins/perl/Makefile
plugins/checksum/Makefile
Expand All @@ -740,6 +781,7 @@ echo libcanberra support ... : $libcanberra
echo Plugin interface ...... : $plugin
echo libproxy support ...... : $libproxy
echo
echo Lua ................... : $lua \($LUA\)
echo Perl .................. : $perl
echo Python ................ : $python
echo
Expand Down
13 changes: 11 additions & 2 deletions data/misc/Makefile.am
Expand Up @@ -3,6 +3,15 @@ appdata_DATA = $(appdata_in_files:.xml.in=.xml)
appdatadir = $(datadir)/appdata
@INTLTOOL_XML_RULE@

if USE_DBUS
exec_command = 'hexchat --existing %U'
else
exec_command = 'hexchat %U'
endif

hexchat.desktop.in: hexchat.desktop.in.in
$(AM_V_GEN)sed -e s!\@exec_command\@!$(exec_command)! < $< > $@

data_desktopdir = $(datadir)/applications
data_desktop_in_files = hexchat.desktop.in

Expand All @@ -26,6 +35,6 @@ uninstall-hook:
$(UPDATE_MIME_DATABASE);
$(UPDATE_DESKTOP_DATABASE);

EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in htm.desktop.in htm-mime.xml
EXTRA_DIST = hexchat.appdata.xml.in hexchat.desktop.in.in htm.desktop.in htm-mime.xml

CLEANFILES = $(appdata_DATA) $(data_desktop_DATA)
CLEANFILES = $(appdata_DATA) $(data_desktop_DATA) hexchat.desktop.in
Expand Up @@ -3,7 +3,7 @@ _Name=HexChat
_GenericName=IRC Client
_Comment=Chat with other people online
_Keywords=IM;Chat;
Exec=hexchat %U
Exec=@exec_command@
Icon=hexchat
Terminal=false
Type=Application
Expand Down