ver_defs.h 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. /*
  2. * $Id$
  3. *
  4. * version and compile flags macros
  5. *
  6. *
  7. * Copyright (C) 2004 FhG Fokus
  8. *
  9. * This file is part of SIP-router, a free SIP server.
  10. *
  11. * SIP-router is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version
  15. *
  16. * SIP-router is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License
  22. * along with this program; if not, write to the Free Software
  23. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  24. */
  25. /** compile flags and other version related defines.
  26. * @file ver_defs.h
  27. * @ingroup core
  28. */
  29. #ifndef version_h
  30. #define version_h
  31. #define SER_FULL_VERSION NAME " " VERSION " (" ARCH "/" OS_QUOTED ")"
  32. #ifdef STATS
  33. #define STATS_STR "STATS: On"
  34. #else
  35. #define STATS_STR "STATS: Off"
  36. #endif
  37. #ifdef USE_IPV6
  38. #define USE_IPV6_STR ", USE_IPV6"
  39. #else
  40. #define USE_IPV6_STR ""
  41. #endif
  42. #ifdef USE_TCP
  43. #define USE_TCP_STR ", USE_TCP"
  44. #else
  45. #define USE_TCP_STR ""
  46. #endif
  47. #ifdef USE_TLS
  48. #define USE_TLS_STR ", USE_TLS"
  49. #else
  50. #define USE_TLS_STR ""
  51. #endif
  52. #ifdef USE_SCTP
  53. #define USE_SCTP_STR ", USE_SCTP"
  54. #else
  55. #define USE_SCTP_STR ""
  56. #endif
  57. #ifdef CORE_TLS
  58. #define CORE_TLS_STR ", CORE_TLS"
  59. #else
  60. #define CORE_TLS_STR ""
  61. #endif
  62. #ifdef TLS_HOOKS
  63. #define TLS_HOOKS_STR ", TLS_HOOKS"
  64. #else
  65. #define TLS_HOOKS_STR ""
  66. #endif
  67. #ifdef USE_RAW_SOCKS
  68. #define USE_RAW_SOCKS_STR ", USE_RAW_SOCKS"
  69. #else
  70. #define USE_RAW_SOCKS_STR ""
  71. #endif
  72. #ifdef DISABLE_NAGLE
  73. #define DISABLE_NAGLE_STR ", DISABLE_NAGLE"
  74. #else
  75. #define DISABLE_NAGLE_STR ""
  76. #endif
  77. #ifdef USE_MCAST
  78. #define USE_MCAST_STR ", USE_MCAST"
  79. #else
  80. #define USE_MCAST_STR ""
  81. #endif
  82. #ifdef NO_DEBUG
  83. #define NO_DEBUG_STR ", NO_DEBUG"
  84. #else
  85. #define NO_DEBUG_STR ""
  86. #endif
  87. #ifdef NO_LOG
  88. #define NO_LOG_STR ", NO_LOG"
  89. #else
  90. #define NO_LOG_STR ""
  91. #endif
  92. #ifdef EXTRA_DEBUG
  93. #define EXTRA_DEBUG_STR ", EXTRA_DEBUG"
  94. #else
  95. #define EXTRA_DEBUG_STR ""
  96. #endif
  97. #ifdef DNS_IP_HACK
  98. #define DNS_IP_HACK_STR ", DNS_IP_HACK"
  99. #else
  100. #define DNS_IP_HACK_STR ""
  101. #endif
  102. #ifdef SHM_MEM
  103. #define SHM_MEM_STR ", SHM_MEM"
  104. #else
  105. #define SHM_MEM_STR ""
  106. #endif
  107. #ifdef SHM_MMAP
  108. #define SHM_MMAP_STR ", SHM_MMAP"
  109. #else
  110. #define SHM_MMAP_STR ""
  111. #endif
  112. #ifdef PKG_MALLOC
  113. #define PKG_MALLOC_STR ", PKG_MALLOC"
  114. #else
  115. #define PKG_MALLOC_STR ""
  116. #endif
  117. #ifdef F_MALLOC
  118. #define F_MALLOC_STR ", F_MALLOC"
  119. #else
  120. #define F_MALLOC_STR ""
  121. #endif
  122. #ifdef DL_MALLOC
  123. #define DL_MALLOC_STR ", DL_MALLOC"
  124. #else
  125. #define DL_MALLOC_STR ""
  126. #endif
  127. #ifdef SF_MALLOC
  128. #define SF_MALLOC_STR ", SF_MALLOC"
  129. #else
  130. #define SF_MALLOC_STR ""
  131. #endif
  132. #ifdef LL_MALLOC
  133. #define LL_MALLOC_STR ", LL_MALLOC"
  134. #else
  135. #define LL_MALLOC_STR ""
  136. #endif
  137. #ifdef USE_SHM_MEM
  138. #define USE_SHM_MEM_STR ", USE_SHM_MEM"
  139. #else
  140. #define USE_SHM_MEM_STR ""
  141. #endif
  142. #ifdef DBG_QM_MALLOC
  143. #define DBG_QM_MALLOC_STR ", DBG_QM_MALLOC"
  144. #else
  145. #define DBG_QM_MALLOC_STR ""
  146. #endif
  147. #ifdef DBG_F_MALLOC
  148. #define DBG_F_MALLOC_STR ", DBG_F_MALLOC"
  149. #else
  150. #define DBG_F_MALLOC_STR ""
  151. #endif
  152. #ifdef DEBUG_DMALLOC
  153. #define DEBUG_DMALLOC_STR ", DEBUG_DMALLOC"
  154. #else
  155. #define DEBUG_DMALLOC_STR ""
  156. #endif
  157. #ifdef DBG_SF_MALLOC
  158. #define DBG_SF_MALLOC_STR ", DBG_SF_MALLOC"
  159. #else
  160. #define DBG_SF_MALLOC_STR ""
  161. #endif
  162. #ifdef DBG_LL_MALLOC
  163. #define DBG_LL_MALLOC_STR ", DBG_SF_MALLOC"
  164. #else
  165. #define DBG_LL_MALLOC_STR ""
  166. #endif
  167. #ifdef TIMER_DEBUG
  168. #define TIMER_DEBUG_STR ", TIMER_DEBUG"
  169. #else
  170. #define TIMER_DEBUG_STR ""
  171. #endif
  172. #ifdef USE_FUTEX
  173. #define USE_FUTEX_STR ", USE_FUTEX"
  174. #else
  175. #define USE_FUTEX_STR ""
  176. #endif
  177. #ifdef FAST_LOCK
  178. #ifdef BUSY_WAIT
  179. #define FAST_LOCK_STR ", FAST_LOCK-BUSY_WAIT"
  180. #elif defined (ADAPTIVE_WAIT)
  181. #define FAST_LOCK_STR ", FAST_LOCK-ADAPTIVE_WAIT"
  182. #else
  183. #define FAST_LOCK_STR ", FAST_LOCK"
  184. #endif
  185. #else
  186. #define FAST_LOCK_STR ""
  187. #endif
  188. #ifdef USE_PTHREAD_MUTEX
  189. #define USE_PTHREAD_MUTEX_STR ", USE_PTHREAD_MUTEX"
  190. #else
  191. #define USE_PTHREAD_MUTEX_STR ""
  192. #endif
  193. #ifdef USE_POSIX_SEM
  194. #define USE_POSIX_SEM_STR ", USE_POSIX_SEM"
  195. #else
  196. #define USE_POSIX_SEM_STR ""
  197. #endif
  198. #ifdef USE_SYSV_SEM
  199. #define USE_SYSV_SEM_STR ", USE_SYSV_SEM"
  200. #else
  201. #define USE_SYSV_SEM_STR ""
  202. #endif
  203. #ifdef NOSMP
  204. #define NOSMP_STR "-NOSMP"
  205. #else
  206. #define NOSMP_STR ""
  207. #endif
  208. #ifdef USE_COMP
  209. #define USE_COMP_STR ", USE_COMP"
  210. #else
  211. #define USE_COMP_STR ""
  212. #endif
  213. #ifdef USE_DNS_CACHE
  214. #define USE_DNS_CACHE_STR ", USE_DNS_CACHE"
  215. #else
  216. #define USE_DNS_CACHE_STR ""
  217. #endif
  218. #ifdef USE_DNS_FAILOVER
  219. #define USE_DNS_FAILOVER_STR ", USE_DNS_FAILOVER"
  220. #else
  221. #define USE_DNS_FAILOVER_STR ""
  222. #endif
  223. #ifdef DNS_WATCHDOG_SUPPORT
  224. #define DNS_WATCHDOG_SUPPORT_STR ", DNS_WATCHDOG_SUPPORT"
  225. #else
  226. #define DNS_WATCHDOG_SUPPORT_STR ""
  227. #endif
  228. #ifdef USE_NAPTR
  229. #define USE_NAPTR_STR ", USE_NAPTR"
  230. #else
  231. #define USE_NAPTR_STR ""
  232. #endif
  233. #ifdef USE_DST_BLACKLIST
  234. #define USE_DST_BLACKLIST_STR ", USE_DST_BLACKLIST"
  235. #else
  236. #define USE_DST_BLACKLIST_STR ""
  237. #endif
  238. #ifdef NO_SIG_DEBUG
  239. #define NO_SIG_DEBUG_STR ", NO_SIG_DEBUG"
  240. #else
  241. #define NO_SIG_DEBUG_STR ""
  242. #endif
  243. #ifdef USE_STUN
  244. #define USE_STUN_STR ", USE_STUN"
  245. #else
  246. #define USE_STUN_STR ""
  247. #endif
  248. #ifdef HAVE_RESOLV_RES
  249. #define HAVE_RESOLV_RES_STR ", HAVE_RESOLV_RES"
  250. #else
  251. #define HAVE_RESOLV_RES_STR ""
  252. #endif
  253. #ifdef MEM_JOIN_FREE
  254. #define MEM_JOIN_FREE_STR ", MEM_JOIN_FREE"
  255. #else
  256. #define MEM_JOIN_FREE_STR ""
  257. #endif
  258. #ifdef SYSLOG_CALLBACK_SUPPORT
  259. #define SYSLOG_CALLBACK_SUPPORT_STR, ", SYSLOG_CALLBACK_SUPPORT"
  260. #else
  261. #define SYSLOG_CALLBACK_SUPPORT_STR ""
  262. #endif
  263. #ifdef MYSQL_FAKE_NULL
  264. #define MYSQL_FAKE_NULL_STR, ", MYSQL_FAKE_NULL"
  265. #else
  266. #define MYSQL_FAKE_NULL_STR ""
  267. #endif
  268. #ifdef USE_DNS_CACHE_STATS
  269. #define USE_DNS_CACHE_STATS_STR ", USE_DNS_CACHE_STATS"
  270. #else
  271. #define USE_DNS_CACHE_STATS_STR ""
  272. #endif
  273. #ifdef USE_DST_BLACKLIST_STATS
  274. #define USE_DST_BLACKLIST_STATS_STR ", USE_DST_BLACKLIST_STATS"
  275. #else
  276. #define USE_DST_BLACKLIST_STATS_STR ""
  277. #endif
  278. #define SER_COMPILE_FLAGS \
  279. STATS_STR EXTRA_DEBUG_STR USE_IPV6_STR USE_TCP_STR USE_TLS_STR \
  280. USE_SCTP_STR CORE_TLS_STR TLS_HOOKS_STR USE_RAW_SOCKS_STR \
  281. USE_STUN_STR DISABLE_NAGLE_STR USE_MCAST_STR NO_DEBUG_STR NO_LOG_STR \
  282. NO_SIG_DEBUG_STR DNS_IP_HACK_STR SHM_MEM_STR SHM_MMAP_STR PKG_MALLOC_STR \
  283. F_MALLOC_STR DL_MALLOC_STR SF_MALLOC_STR LL_MALLOC_STR \
  284. USE_SHM_MEM_STR \
  285. DBG_QM_MALLOC_STR \
  286. DBG_F_MALLOC_STR DEBUG_DMALLOC_STR DBG_SF_MALLOC_STR DBG_LL_MALLOC_STR \
  287. TIMER_DEBUG_STR \
  288. USE_FUTEX_STR \
  289. FAST_LOCK_STR NOSMP_STR USE_PTHREAD_MUTEX_STR USE_POSIX_SEM_STR \
  290. USE_SYSV_SEM_STR USE_COMP_STR USE_DNS_CACHE_STR USE_DNS_FAILOVER_STR \
  291. DNS_WATCHDOG_SUPPORT_STR USE_NAPTR_STR USE_DST_BLACKLIST_STR \
  292. HAVE_RESOLV_RES_STR SYSLOG_CALLBACK_SUPPORT_STR MYSQL_FAKE_NULL_STR \
  293. USE_DST_BLACKLIST_STATS_STR USE_DNS_CACHE_STATS_STR
  294. #endif