You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

281 lines
8.0 KiB

12 years ago
12 years ago
6 years ago
12 years ago
12 years ago
12 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
Asciidoc man page rework (#699) * Add 'tunnel_address' support for json config parser And allow ss-tunnel to use the newly introduced parser. Signed-off-by: Adam Anonymous <anonymous_temp_user@yahoo.co.jp> * Add "mode" support for jconf Now jconf supports "mode" setting, allowed values are "tcp_only", "tcp_and_udp" and "udp_only". Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Use jconf "mode" for server/local/tunnel/manager Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Add per-project vimrc to gitignore As the coding style differs from kernel and other projects, so such project vimrc should be helpful. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Introduce asciidoc based documentation framework Use asciidoc for new documentation framework, which could not only output man pages, but also htmls. And asciidoc documentation is much more human-readable than roff man pages. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert shadowsocks-libev man page to asciidoc The port to asciidoc has some format change compared to old one. The most obvious one is the options listed in SYNOPSIS. Now the options list is not split into 2/3 columns, or we must use asciidoc tables and introduce table frames. Other small change includes the removal of AUTHOR sector, as it's not an expendable method to update AUTHOR sector every time it gets updated. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-local man page to asciidoc Also modify gitignore, since it use too generic rules to ignore such documentation. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-manager man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-nat man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-redir man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-server man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Convert ss-tunnel man page to asciidoc Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Remove old roff man pages Welcome to the new age of asciidoc. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp> * Doc: Add equivalent tables for command line options and config file Now user can get a more clear view of config file and command line options. Signed-off-by: Adam Anonymous <anonymous_temp_mail@yahoo.co.jp>
8 years ago
12 years ago
12 years ago
11 years ago
12 years ago
7 years ago
11 years ago
11 years ago
11 years ago
8 years ago
12 years ago
8 years ago
8 years ago
8 years ago
12 years ago
12 years ago
7 years ago
12 years ago
7 years ago
7 years ago
7 years ago
7 years ago
12 years ago
  1. dnl -*- Autoconf -*-
  2. dnl Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.67])
  4. AC_INIT([shadowsocks-libev], [3.1.3], [max.c.lv@gmail.com])
  5. AC_CONFIG_SRCDIR([src/crypto.c])
  6. AC_CONFIG_HEADERS([config.h])
  7. AC_CONFIG_AUX_DIR(auto)
  8. AC_CONFIG_MACRO_DIR([m4])
  9. AC_USE_SYSTEM_EXTENSIONS
  10. AM_INIT_AUTOMAKE([subdir-objects foreign -Wno-gnu -Werror])
  11. AM_EXTRA_RECURSIVE_TARGETS([rpm srpm])
  12. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  13. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  14. AM_MAINTAINER_MODE
  15. AM_DEP_TRACK
  16. dnl Checks for lib
  17. AC_DISABLE_STATIC
  18. AC_DISABLE_SHARED
  19. LT_INIT([dlopen])
  20. dnl Check for pcre library
  21. TS_CHECK_PCRE
  22. if test "x${enable_pcre}" != "xyes"; then
  23. AC_MSG_ERROR([Cannot find pcre library. Configure --with-pcre=DIR])
  24. fi
  25. dnl Checks for using shared libraries from system
  26. AC_ARG_ENABLE(
  27. [system-shared-lib],
  28. AS_HELP_STRING([--enable-system-shared-lib], [build against shared libraries when possible]),
  29. [
  30. case "${enableval}" in
  31. yes) enable_system_shared_lib=true ;;
  32. no) enable_system_shared_lib=false ;;
  33. *) AC_MSG_ERROR([bad value ${enableval} for --enable-system-shared-lib]) ;;
  34. esac], [enable_system_shared_lib=false])
  35. AM_CONDITIONAL([USE_SYSTEM_SHARED_LIB], [test x$enable_system_shared_lib = xtrue])
  36. AC_ARG_ENABLE([documentation],
  37. AS_HELP_STRING([--disable-documentation], [do not build documentation]),
  38. [disable_documentation=true],
  39. [disable_documentation=false])
  40. AM_CONDITIONAL([ENABLE_DOCUMENTATION], [test x$disable_documentation = xfalse])
  41. AM_COND_IF([ENABLE_DOCUMENTATION], [
  42. AC_PATH_PROG([ASCIIDOC], [asciidoc])
  43. test x"${ASCIIDOC}" != x || AC_MSG_ERROR([Cannot find `asciidoc` in PATH.])
  44. AC_PATH_PROG([XMLTO], [xmlto])
  45. test x"$XMLTO" != x || AC_MSG_ERROR([Cannot find `xmlto` in PATH.])
  46. AC_PATH_PROG([GZIP], [gzip], [gzip])
  47. AC_PATH_PROG([MV], [mv], [mv])
  48. AC_PROG_SED
  49. ])
  50. dnl Checks for programs.
  51. AC_PROG_CC
  52. AM_PROG_CC_C_O
  53. AC_PROG_INSTALL
  54. AC_PROG_LN_S
  55. AC_PROG_MAKE_SET
  56. AC_LANG_SOURCE
  57. dnl Add library for mingw
  58. case $host in
  59. *-mingw*)
  60. CFLAGS="$CFLAGS -mno-ms-bitfields"
  61. LIBS="$LIBS -lws2_32"
  62. ;;
  63. *-cygwin*)
  64. CFLAGS="$CFLAGS -mno-ms-bitfields"
  65. ;;
  66. *)
  67. ;;
  68. esac
  69. dnl Checks for TLS
  70. AX_TLS([:], [:])
  71. dnl Checks for crypto libraries
  72. ss_MBEDTLS
  73. ss_SODIUM
  74. ss_CARES
  75. dnl Checks for inet_ntop
  76. ss_FUNC_INET_NTOP
  77. dnl Checks for host.
  78. AC_MSG_CHECKING(for what kind of host)
  79. case $host in
  80. *-linux*)
  81. os_support=linux
  82. AC_MSG_RESULT(Linux)
  83. ;;
  84. *-mingw*)
  85. os_support=mingw
  86. AC_MSG_RESULT(MinGW)
  87. ;;
  88. *)
  89. AC_MSG_RESULT(transparent proxy does not support for $host)
  90. ;;
  91. esac
  92. dnl Checks for pthread
  93. AX_PTHREAD([LIBS="$PTHREAD_LIBS $LIBS"
  94. CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
  95. CC="$PTHREAD_CC"], AC_MSG_ERROR(Can not find pthreads. This is required.))
  96. dnl Checks for stack protector
  97. GGL_CHECK_STACK_PROTECTOR([has_stack_protector=yes], [has_stack_protector=no])
  98. # XXX - disable -fstack-protector due to missing libssp_nonshared
  99. case "$host_os" in
  100. *aix*)
  101. AC_MSG_NOTICE([-fstack-protector disabled on AIX])
  102. has_stack_protector=no
  103. ;;
  104. *sunos*)
  105. AC_MSG_NOTICE([-fstack-protector disabled on SunOS])
  106. has_stack_protector=no
  107. ;;
  108. *solaris*)
  109. AC_MSG_NOTICE([-fstack-protector disabled on Solaris])
  110. has_stack_protector=no
  111. ;;
  112. esac
  113. AC_ARG_ENABLE(ssp,
  114. [AS_HELP_STRING(--disable-ssp,Do not compile with -fstack-protector)],
  115. [
  116. enable_ssp="no"
  117. ],
  118. [
  119. enable_ssp="yes"
  120. ])
  121. if test x$has_stack_protector = xyes && test x$enable_ssp = xyes; then
  122. CFLAGS="$CFLAGS -fstack-protector"
  123. AC_MSG_NOTICE([-fstack-protector enabled in CFLAGS])
  124. fi
  125. AM_CONDITIONAL(BUILD_REDIRECTOR, test "$os_support" = "linux")
  126. AM_CONDITIONAL(BUILD_WINCOMPAT, test "$os_support" = "mingw")
  127. dnl Checks for header files.
  128. AC_CHECK_HEADERS([limits.h stdint.h inttypes.h arpa/inet.h fcntl.h langinfo.h locale.h linux/tcp.h netinet/tcp.h netdb.h netinet/in.h stdlib.h string.h strings.h unistd.h sys/ioctl.h linux/random.h])
  129. dnl A special check required for <net/if.h> on Darwin. See
  130. dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html.
  131. AC_CHECK_HEADERS([sys/socket.h])
  132. AC_CHECK_HEADERS([net/if.h], [], [],
  133. [
  134. #include <stdio.h>
  135. #ifdef STDC_HEADERS
  136. # include <stdlib.h>
  137. # include <stddef.h>
  138. #else
  139. # ifdef HAVE_STDLIB_H
  140. # include <stdlib.h>
  141. # endif
  142. #endif
  143. #ifdef HAVE_SYS_SOCKET_H
  144. # include <sys/socket.h>
  145. #endif
  146. ])
  147. case $host in
  148. *-mingw*)
  149. AC_DEFINE([CONNECT_IN_PROGRESS], [WSAEWOULDBLOCK], [errno for incomplete non-blocking connect(2)])
  150. AC_CHECK_HEADERS([winsock2.h ws2tcpip.h mswsock.h], [], [AC_MSG_ERROR([Missing MinGW headers])], [])
  151. ;;
  152. *-linux*)
  153. AC_DEFINE([CONNECT_IN_PROGRESS], [EINPROGRESS], [errno for incomplete non-blocking connect(2)])
  154. dnl Checks for netfilter headers
  155. AC_CHECK_HEADERS([linux/if.h linux/netfilter_ipv4.h linux/netfilter_ipv6/ip6_tables.h],
  156. [], [AC_MSG_ERROR([Missing netfilter headers])],
  157. [[
  158. #if HAVE_LIMITS_H
  159. #include <limits.h>
  160. #endif
  161. /* Netfilter ip(6)tables v1.4.0 has broken headers */
  162. #if HAVE_NETINET_IN_H
  163. #include <netinet/in.h>
  164. #endif
  165. #if HAVE_LINUX_IF_H
  166. #include <linux/if.h>
  167. #endif
  168. #if HAVE_SYS_SOCKET_H
  169. #include <sys/socket.h>
  170. #endif
  171. ]])
  172. ;;
  173. *)
  174. # These are POSIX-like systems using BSD-like sockets API.
  175. AC_DEFINE([CONNECT_IN_PROGRESS], [EINPROGRESS], [errno for incomplete non-blocking connect(2)])
  176. ;;
  177. esac
  178. AC_C_BIGENDIAN
  179. dnl Checks for typedefs, structures, and compiler characteristics.
  180. AC_C_INLINE
  181. AC_TYPE_SSIZE_T
  182. dnl Checks for header files.
  183. AC_HEADER_ASSERT
  184. AC_HEADER_STDC
  185. AC_HEADER_SYS_WAIT
  186. dnl Checks for typedefs, structures, and compiler characteristics.
  187. AC_C_CONST
  188. AC_TYPE_PID_T
  189. AC_TYPE_SIZE_T
  190. AC_TYPE_SSIZE_T
  191. AC_TYPE_UINT16_T
  192. AC_TYPE_UINT8_T
  193. AC_HEADER_TIME
  194. dnl Checks for library functions.
  195. AC_FUNC_FORK
  196. AC_FUNC_SELECT_ARGTYPES
  197. AC_TYPE_SIGNAL
  198. AC_CHECK_FUNCS([memset select setresuid setreuid strerror get_current_dir_name getpwnam_r setrlimit])
  199. AC_CHECK_LIB(socket, connect)
  200. dnl Checks for library functions.
  201. AC_CHECK_FUNCS([malloc memset posix_memalign socket])
  202. AC_ARG_WITH(ev,
  203. AS_HELP_STRING([--with-ev=DIR], [use a specific libev library]),
  204. [CFLAGS="$CFLAGS -I$withval/include"
  205. CPPFLAGS="$CPPFLAGS -I$withval/include"
  206. LDFLAGS="$LDFLAGS -L$withval/lib"]
  207. )
  208. AC_CHECK_HEADERS([ev.h libev/ev.h], [], [])
  209. AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
  210. AC_CONFIG_FILES([shadowsocks-libev.pc
  211. Makefile
  212. doc/Makefile
  213. src/Makefile
  214. rpm/Makefile])
  215. AM_COND_IF([USE_SYSTEM_SHARED_LIB],
  216. [AC_DEFINE([USE_SYSTEM_SHARED_LIB], [1], [Define if use system shared lib.])],
  217. [AC_CONFIG_FILES([libbloom/Makefile libcork/Makefile libipset/Makefile])])
  218. AC_ARG_ENABLE(connmarktos,
  219. [AS_HELP_STRING(--enable-connmarktos, Enable saved connmark to IP TOS QoS feature)],
  220. [
  221. enable_connmarktos="yes"
  222. ],
  223. [
  224. enable_connmarktos="no"
  225. ])
  226. if test x"$enable_connmarktos" = "xyes" ; then
  227. AC_MSG_NOTICE([Linux Netfilter Conntrack support requested by --enable-connmarktos: ${enable_connmarktos}])
  228. if test "x$enable_connmarktos" != "xno"; then
  229. AC_SEARCH_LIBS([nfct_query], [netfilter_conntrack],,[
  230. if test x"$enable_connmarktos" = "xyes"; then
  231. AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack library not found])
  232. fi
  233. with_netfilter_conntrack=no])
  234. AC_CHECK_HEADERS([libnetfilter_conntrack/libnetfilter_conntrack.h \
  235. libnetfilter_conntrack/libnetfilter_conntrack_tcp.h],,[
  236. if test x"$enable_connmarktos" = "xyes"; then
  237. AC_MSG_ERROR([--enable-connmarktos specified but libnetfilter-conntrack headers not found])
  238. fi
  239. with_netfilter_conntrack=no])
  240. # If nothing is broken; enable the libraries usage.
  241. if test "x$with_netfilter_conntrack" != "xno"; then
  242. with_netfilter_conntrack=yes
  243. AC_DEFINE(USE_NFCONNTRACK_TOS, 1, [Enable support for QOS netfilter mark preservation])
  244. fi
  245. fi
  246. fi
  247. AC_OUTPUT