Add make support for FiSHLiM on Unix

This commit is contained in:
Berke Viktor 2012-07-18 10:51:22 +02:00
parent 0cf80ecb32
commit 1d3c6d672e
5 changed files with 72 additions and 76 deletions

View File

@ -137,6 +137,10 @@ AC_ARG_ENABLE(doat,
[ --disable-doat disable the Do At plugin],
doat=$enableval, doat=yes)
AC_ARG_ENABLE(fishlim,
[ --disable-fishlim disable the FiSHLiM plugin],
fishlim=$enableval, fishlim=yes)
AC_ARG_ENABLE(plugin,
[ --disable-plugin disable plugin support],
plugin=$enableval, plugin=yes)
@ -370,36 +374,6 @@ if test "$tcl" != "no"; then
fi
fi
dnl *********************************************************************
dnl ** SASL *************************************************************
dnl *********************************************************************
if test "$sasl" != "no"; then
AC_MSG_CHECKING(for plugin interface used by SASL)
sasl=no
if test "$plugin" = yes; then
sasl=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SASL])
fi
fi
dnl *********************************************************************
dnl ** DO AT ************************************************************
dnl *********************************************************************
if test "$doat" != "no"; then
AC_MSG_CHECKING(for plugin interface used by Do At)
doat=no
if test "$plugin" = yes; then
doat=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Do At])
fi
fi
dnl *********************************************************************
dnl ** IPv6 *************************************************************
dnl *********************************************************************
@ -521,6 +495,57 @@ if test "$plugin" = yes; then
fi
fi
dnl *********************************************************************
dnl ** SASL *************************************************************
dnl *********************************************************************
if test "$sasl" != "no"; then
AC_MSG_CHECKING(for plugin interface used by SASL)
sasl=no
if test "$plugin" = yes; then
sasl=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for SASL])
fi
fi
dnl *********************************************************************
dnl ** DO AT ************************************************************
dnl *********************************************************************
if test "$doat" != "no"; then
AC_MSG_CHECKING(for plugin interface used by Do At)
doat=no
if test "$plugin" = yes; then
doat=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option for Do At])
fi
fi
dnl *********************************************************************
dnl ** FiSHLiM **********************************************************
dnl *********************************************************************
if test "$fishlim" != "no"; then
fishlim=no
AC_MSG_CHECKING(for plugin interface used by FiSHLiM)
if test "$plugin" = yes; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([plugins are disabled, use the --enable-plugin option])
fi
AC_MSG_CHECKING(for OpenSSL used by FiSHLiM)
if test "$openssl" = yes; then
fishlim=yes
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([OpenSSL cannot be found, use the --enable-openssl option])
fi
fi
dnl #######################################################################
dnl # Check for DBUS libraries
dnl #######################################################################
@ -615,6 +640,7 @@ AM_CONDITIONAL(DO_PYTHON, test "x$python" = "xyes")
AM_CONDITIONAL(DO_TCL, test "x$tcl" = "xyes")
AM_CONDITIONAL(DO_SASL, test "x$sasl" = "xyes")
AM_CONDITIONAL(DO_DOAT, test "x$doat" = "xyes")
AM_CONDITIONAL(DO_FISHLIM, test "x$fishlim" = "xyes")
AM_CONDITIONAL(DO_PLUGIN, test "x$plugin" = "xyes")
AM_CONDITIONAL(USE_DBUS, test "x$dbus" = "xyes")
AM_CONDITIONAL(DO_GCONF, test "x$GCONFTOOL" != "xno")
@ -879,6 +905,7 @@ plugins/perl/Makefile
plugins/tcl/Makefile
plugins/sasl/Makefile
plugins/doat/Makefile
plugins/fishlim/Makefile
intl/Makefile
po/Makefile.in
])
@ -902,7 +929,7 @@ echo libnotify support ... : $libnotify
echo
echo Perl ................ : $perl\ SASL .................. : $sasl
echo Python .............. : $python\ Do At ................. : $doat
echo Tcl ................. : $tcl
echo Tcl ................. : $tcl\ FiSHLiM ............... : $fishlim
echo
echo The binary will be installed in $prefix/bin
echo

View File

@ -25,5 +25,9 @@ if DO_DOAT
doatdir = doat
endif
if DO_FISHLIM
fishlimdir = fishlim
endif
#SUBDIRS = . $(pythondir) $(perldir) mailcheck xdcc
SUBDIRS = . $(pythondir) $(perldir) $(tcldir) $(sasldir) $(doatdir)
SUBDIRS = . $(pythondir) $(perldir) $(tcldir) $(sasldir) $(doatdir) $(fishlimdir)

View File

@ -1,40 +0,0 @@
OURCFLAGS = -Wall -Wextra -Wno-unused-parameter -std=c99 -pedantic `pkg-config --cflags glib-2.0 libcrypto` -DG_DISABLE_DEPRECATED=1 -fPIC $(CFLAGS)
#OURLINKFLAGS = `pkg-config --libs glib-2.0 libcrypto` -shared -fPIC -Wl,-z,defs $(CFLAGS) $(LDFLAGS)
OURLINKFLAGS = `pkg-config --libs glib-2.0 libcrypto` $(CFLAGS) $(LDFLAGS)
BASE_OBJECTS = irc.o fish.o keystore.o misc.o
PLUGIN_OBJECTS = $(BASE_OBJECTS) plugin_xchat.o
TEST_OBJECTS = $(BASE_OBJECTS) test.o
all: fishlim.so test
fish.o: fish.h keystore.h misc.h
irc.o: irc.h
keystore.o: keystore.h irc.h fish.h misc.h plugin_xchat.h
misc.o: misc.h
test.o: fish.h
plugin_xchat.o: fish.h irc.h keystore.h plugin_xchat.h
.c.o:
$(CC) $(OURCFLAGS) -c $< -o $@
fishlim.so: $(PLUGIN_OBJECTS)
$(CC) -shared $(OURLINKFLAGS) $(PLUGIN_OBJECTS) -o $@
test: $(TEST_OBJECTS)
$(CC) $(TEST_OBJECTS) -o $@ $(OURLINKFLAGS)
.PHONY: all clean distclean install uninstall
clean:
-$(RM) -f $(PLUGIN_OBJECTS) $(TEST_OBJECTS) fishlim.so test
distclean: clean
install: fishlim.so
install -d $(DESTDIR)/usr/lib/xchat/plugins/
install -m 644 fishlim.so $(DESTDIR)/usr/lib/xchat/plugins/
uninstall:
rm $(DESTDIR)/usr/lib/xchat/plugins/fishlim.so

View File

@ -0,0 +1,9 @@
EXTRA_DIST = INSTALL LICENSE README
libdir = $(hexchatlibdir)/plugins
lib_LTLIBRARIES = fishlim.la
fishlim_la_SOURCES = fish.c irc.c keystore.c misc.c plugin_xchat.c
fishlim_la_LDFLAGS = -avoid-version -module
fishlim_la_LIBADD =
INCLUDES = $(COMMON_CFLAGS) -I$(srcdir)/..

View File

@ -27,11 +27,7 @@
#include <string.h>
// #pragma GCC visibility push(default)
#ifdef _MSC_VER
#include "xchat-plugin.h"
#else
#include <xchat/xchat-plugin.h>
#endif
#define XCHAT_MAX_WORDS 32
// #pragma GCC visibility pop