summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorguliver <guliver@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-16 15:24:49 +0000
committerguliver <guliver@97f52cf1-0a1b-0410-bd0e-c28be96e8082>2007-02-16 15:24:49 +0000
commit46e7eba7e031f101a82973caae71c2a0c1882cca (patch)
tree553c037b867439d72318e5f1b405601e3608d939 /m4
parentf0f1c557e1d9e42c79dbf566990b369929be09dd (diff)
downloadzabbix-46e7eba7e031f101a82973caae71c2a0c1882cca.tar.gz
zabbix-46e7eba7e031f101a82973caae71c2a0c1882cca.tar.xz
zabbix-46e7eba7e031f101a82973caae71c2a0c1882cca.zip
- integrated jabber messager (Eugene)
git-svn-id: svn://svn.zabbix.com/trunk@3835 97f52cf1-0a1b-0410-bd0e-c28be96e8082
Diffstat (limited to 'm4')
-rw-r--r--m4/jabber.m479
1 files changed, 79 insertions, 0 deletions
diff --git a/m4/jabber.m4 b/m4/jabber.m4
new file mode 100644
index 00000000..f93883ae
--- /dev/null
+++ b/m4/jabber.m4
@@ -0,0 +1,79 @@
+# JABBER_CHECK_CONFIG ([DEFAULT-ACTION])
+# ----------------------------------------------------------
+# Eugene Grigorjev <eugene@zabbix.com> Feb-02-2007
+#
+# Checks for iksemel. DEFAULT-ACTION is the string yes or no to
+# specify whether to default to --with-jabber or --without-jabber.
+# If not supplied, DEFAULT-ACTION is no.
+#
+# This macro #defines HAVE_JABBER and HAVE_IKSEMEL if a required header files is
+# found, and sets @JABBER_LDFLAGS@ and @JABBER_CPPFLAGS@ to the necessary
+# values.
+#
+# Users may override the detected values by doing something like:
+# JABBER_LDFLAGS="-liksemel" JABBER_CPPFLAGS="-I/usr/myinclude" ./configure
+#
+# This macro 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.
+
+AC_DEFUN([JABBER_CHECK_CONFIG],
+[
+ AC_ARG_WITH(jabber,
+[
+If you want to use Jabber protocol for messaging:
+AC_HELP_STRING([--with-jabber@<:@=DIR@:>@],[Include Jabber support @<:@default=no@:>@. DIR is the iksemel library install directory.])],[
+ if test "$withval" = "no"; then
+ want_jabber="no"
+ _libiksemel_with="no"
+ elif test "$withval" = "yes"; then
+ want_jabber="yes"
+ _libiksemel_with="yes"
+ else
+ want_jabber="yes"
+ _libiksemel_with=$withval
+ fi
+ ],[_libiksemel_with=ifelse([$1],,[no],[$1])])
+
+ if test "x$_libiksemel_with" != x"no"; then
+ if test "$_libiksemel_with" = "yes"; then
+ PKG_CHECK_MODULES(IKSEMEL,iksemel,
+ [
+ JABBER_INCDIR=$IKSEMEL_CPPFLAGS
+ JABBER_LIBDIR=$IKSEMEL_LIBS
+ ],[
+ found_iksemel="no"
+ found_jabber="no"
+ ])
+ else
+ AC_MSG_CHECKING(for iksemel support)
+
+ if test -f $_libiksemel_with/include/iksemel.h; then
+ JABBER_INCDIR=-I$_libiksemel_with/include
+ JABBER_LIBDIR=-L$_libiksemel_with/lib
+ JABBER_LIBS=-liksemel
+ AC_MSG_RESULT(yes)
+ else
+ found_iksemel="no"
+ found_jabber="no"
+ AC_MSG_RESULT(no)
+ fi
+ fi
+
+ if test "x$found_iksemel" != "xno" ; then
+
+ JABBER_CPPFLAGS=$JABBER_INCDIR
+ JABBER_LDFLAGS="$JABBER_LIBDIR $JABBER_LIBS"
+
+ found_iksemel="yes"
+ found_jabber="yes"
+ AC_DEFINE(HAVE_IKSEMEL,1,[Define to 1 if Iksemel library should be enabled.])
+ AC_DEFINE(HAVE_JABBER,1,[Define to 1 if Jabber should be enabled.])
+ fi
+ fi
+
+ AC_SUBST(JABBER_CPPFLAGS)
+ AC_SUBST(JABBER_LDFLAGS)
+
+ unset _libiksemel_with
+])dnl