config.h.in
author Myhailo Danylenko <isbear@ukrpost.net>
Sat, 05 Mar 2016 18:04:48 +0200
changeset 65 72ffcf688664
parent 63 c17f3295f52c
child 66 a40beb82130c
permissions -rw-r--r--
cmake: Utilise find_package for lua


/* Copyright 2009-2016 Myhailo Danylenko

This file is part of lua-lm.

lua-lm 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 LLM_CONFIG_H
#define LLM_CONFIG_H

// define this to enable debugging output
#cmakedefine DEBUG

// define this, if your loudmouth uses SHA256 fingerprints
#cmakedefine HAVE_LM_SHA256_FINGERPRINTS

// define this, if your loudmouth have lm_connection_get_keep_alive_rate ()
#cmakedefine HAVE_LM_CONNECTION_GET_KEEP_ALIVE_RATE

// define this, if your loudmouth have lm_connection_unregister_reply_handler ()
#cmakedefine HAVE_LM_CONNECTION_UNREGISTER_REPLY_HANDLER

// define this, if your loudmouth have lm_ssl_set_ca ()
#cmakedefine HAVE_LM_SSL_SET_CA

// define this, if your loudmouth have lm_ssl_set_cipher_list ()
#cmakedefine HAVE_LM_SSL_SET_CIPHER_LIST

// building against lua 5.1
#cmakedefine LUA51_COMPATIBILITY

#ifdef LUA51_COMPATIBILITY
#  define lua_rawlen lua_objlen
#  define luaL_setfuncs(STATE, REGTABLE, IGZERO) luaL_register ( STATE, NULL, REGTABLE )
#endif

#ifdef DEBUG
#  include <glib.h>

#  ifndef LLM_LOG_PREFIX
#    define LLM_LOG_PREFIX ( "lua-lm" )
#  endif

#  define D(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_DEBUG, FORMAT); }
#  define I(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_INFO, FORMAT); }
#  define W(FORMAT...) { g_log (LLM_LOG_PREFIX, G_LOG_LEVEL_WARNING, FORMAT); }
#  define E(FORMAT...) { g_log (LLM_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