config.h.in
author Myhailo Danylenko <isbear@ukrpost.net>
Mon, 12 Apr 2010 00:41:23 +0300
changeset 110 bd9f24178d67
parent 109 2d2111cb5109
child 115 47bed161e3b0
permissions -rw-r--r--
Prevent re-unregistering commands


/* Copyright 2009 Myhailo Danylenko

This file is part of mcabber-lua.

mcabber-lua 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, see <http://www.gnu.org/licenses/>. */

#ifndef MLUA_CONFIG_H
#define MLUA_CONFIG_H

#include <mcabber/config.h>

#if MCABBER_BRANCH_EXPERIMENTAL && MCABBER_API_VERSION >= 27
#  define HAVE_CMD_ID
#endif

// define this to enable debugging output
#cmakedefine DEBUG

// define this to enable exporting mcabber connection for lua-loudmouth
#cmakedefine LLM_CONNECTION_ENABLE

// define this to enable lua-loudmouth log messages handler
#cmakedefine LLM_LOG_HANDLER

// size of background pipe reading buffer
#define MLUA_BGREAD_BUFFER   ( ${ML_BGREAD_BUFFER} )

// priority of glib event sources for timeout and bgread
#define MLUA_SOURCE_PRIORITY ( ${ML_SOURCE_PRIORITY} )

#define PROJECT_VERSION ( "${PROJECT_VERSION}" )

#ifdef DEBUG
#  include <stdio.h>

#  ifndef MLUA_LOG_PREFIX
#    define MLUA_LOG_PREFIX ( NULL )
#  endif

#  define D(FORMAT...) { g_log (MLUA_LOG_PREFIX, G_LOG_LEVEL_DEBUG, FORMAT); }
#  define I(FORMAT...) { g_log (MLUA_LOG_PREFIX, G_LOG_LEVEL_INFO, FORMAT); }
#  define W(FORMAT...) { g_log (MLUA_LOG_PREFIX, G_LOG_LEVEL_WARNING, FORMAT); }
#  define E(FORMAT...) { g_log (MLUA_LOG_PREFIX, G_LOG_LEVEL_ERROR, FORMAT); }
#else
#  define D(FORMAT...) { /* FORMAT */ }
#  define I(FORMAT...) { /* FORMAT */ }
#  define W(FORMAT...) { /* FORMAT */ }
#  define E(FORMAT...) { /* FORMAT */ }
#endif

#endif