/*-*- mode: C; tab-width:4 -*-*/

#ifndef INIT_CFG_H
#define INIT_CFG_H
#include "zend_extensions.h"

#define JAVA 1
#define MONO 2
#define java java
#define mono mono
#define ap_php_snprintf snprintf


#define EXTENSION @EXTENSION@
#if EXTENSION == JAVA
#define java_snprintf ap_php_snprintf 
#define DEFAULT_WRAPPER DEFAULT_JAVA_WRAPPER
#define DEFAULT_PORT DEFAULT_JAVA_PORT /* init_cfg.h overrides */
#define N_SARGS N_JAVA_SARGS	/* # of server args for exec */
#define N_SENV N_JAVA_SENV		/* # of server env entries */
#define EXT java
#define EXTC Java
#define EXTU "JAVA"
#else
#define mono_snprintf ap_php_snprintf 
#define DEFAULT_PORT DEFAULT_MONO_PORT
#define DEFAULT_WRAPPER DEFAULT_MONO_WRAPPER
#define N_SARGS N_MONO_SARGS
#define N_SENV N_MONO_SENV
#define EXT mono
#define EXTC Mono
#define EXTU "MONO"
#endif

#ifndef BRIDGE_VERSION
#define BRIDGE_VERSION "@BRIDGE_VERSION@"
#endif


#define EXT_CONCAT(prefix, ext, sep, fkt) prefix##ext##sep##fkt
#define EXT_EXPAND(prefix, ext, sep, fkt) EXT_CONCAT(prefix, ext, sep, fkt)
#define EXT_GLOBAL_EX(prefix, fkt, sep) EXT_EXPAND(prefix, EXT, sep, fkt)
#define EXT_GLOBAL_N(fkt) EXT_EXPAND( , EXT, , fkt)
#define EXT_GLOBAL(fkt) EXT_EXPAND( , EXT, _, fkt)

#define EXT_DECLARE_MODULE_GLOBALS(ext) ZEND_DECLARE_MODULE_GLOBALS(ext)
#define EXT_EXTERN_MODULE_GLOBALS(ext) ZEND_EXTERN_MODULE_GLOBALS(ext)
#define EXT_INIT_MODULE_GLOBALS(a,b,c) ZEND_INIT_MODULE_GLOBALS(a,b,c);
#define EXT_BEGIN_MODULE_GLOBALS(ext) ZEND_BEGIN_MODULE_GLOBALS(ext)
#define EXT_END_MODULE_GLOBALS(ext) ZEND_END_MODULE_GLOBALS(ext)
#define EXT_STR(ext) #ext
#define EXT_STR_EXPAND(ext) EXT_STR(ext)
#define EXT_NAME() EXT_STR_EXPAND(EXT)
#define EXT_NAMEC() EXT_STR_EXPAND(EXTC)
#define EXT_MINIT(ext) PHP_MINIT(ext)
#define EXT_MSHUTDOWN(ext) PHP_MSHUTDOWN(ext)
#define EXT_RINIT(ext) PHP_RINIT(ext)
#define EXT_RSHUTDOWN(ext) PHP_RSHUTDOWN(ext)
#define EXT_MINFO(ext) PHP_MINFO(ext)
#define EXT_GET_MODULE(ext) ZEND_GET_MODULE(ext)
#define EXT_METHOD(classname, name) PHP_METHOD(classname, name)
#define EXT_FUNCTION(name) PHP_FUNCTION(name)
#define EXT_ME(classname, name, arg_info, flags) ZEND_ME(classname, name, arg_info, flags)
#define EXT_FN(name) ZEND_FN(name)
#if ZEND_EXTENSION_API_NO >= 220060519 
#define EXT_MN(name) ZEND_MN(name)
#else
#define EXT_MN(name) ZEND_FN(name)
#endif
#define EXT_TSRMG(id, type, element) TSRMG(id, type, element)
#define EXT_FE(name, arg_info) ZEND_FE(name, arg_info)
#define EXT_MALIAS(classname, name, alias, arg_info, flags) ZEND_MALIAS(classname, name, alias, arg_info, flags)
#define EXT_FALIAS(name, alias, arg_types) ZEND_FALIAS(name, alias, arg_types)

#endif
