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.

108 lines
2.3 KiB

12 years ago
12 years ago
11 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
11 years ago
12 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
12 years ago
12 years ago
12 years ago
12 years ago
12 years ago
11 years ago
12 years ago
12 years ago
11 years ago
11 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], [1.4.0], [max.c.lv@gmail.com])
  5. AC_CONFIG_SRCDIR([src/encrypt.c])
  6. AC_CONFIG_HEADERS([config.h])
  7. AM_INIT_AUTOMAKE([foreign -Wall -Werror])
  8. m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
  9. dnl Checks for programs.
  10. AC_PROG_CC
  11. AC_PROG_INSTALL
  12. AC_PROG_LIBTOOL
  13. AC_PROG_LN_S
  14. AC_PROG_MAKE_SET
  15. AC_LANG_SOURCE
  16. AM_PROG_CC_C_O
  17. dnl Checks for libev
  18. m4_include([libev/libev.m4])
  19. dnl Checks for openssl
  20. ss_OPENSSL
  21. dnl Checks for inet_ntop
  22. ss_FUNC_INET_NTOP
  23. dnl Checks for host.
  24. AC_MSG_CHECKING(for what kind of host)
  25. case $host in
  26. *-linux*)
  27. os_support=linux
  28. AC_MSG_RESULT(Linux)
  29. ;;
  30. *)
  31. AC_MSG_RESULT(transparent proxy does not support for $host)
  32. ;;
  33. esac
  34. AM_CONDITIONAL(BUILD_REDIRECTOR, test "$os_support" = "linux")
  35. dnl Checks for header files.
  36. AC_CHECK_HEADERS([stdint.h inttypes.h arpa/inet.h fcntl.h langinfo.h locale.h netdb.h netinet/in.h stdlib.h string.h strings.h unistd.h sys/ioctl.h])
  37. dnl A special check required for <net/if.h> on Darwin. See
  38. dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html.
  39. AC_CHECK_HEADERS([sys/socket.h])
  40. AC_CHECK_HEADERS([net/if.h], [], [],
  41. [
  42. #include <stdio.h>
  43. #ifdef STDC_HEADERS
  44. # include <stdlib.h>
  45. # include <stddef.h>
  46. #else
  47. # ifdef HAVE_STDLIB_H
  48. # include <stdlib.h>
  49. # endif
  50. #endif
  51. #ifdef HAVE_SYS_SOCKET_H
  52. # include <sys/socket.h>
  53. #endif
  54. ])
  55. AC_C_BIGENDIAN
  56. dnl Checks for typedefs, structures, and compiler characteristics.
  57. AC_C_INLINE
  58. AC_TYPE_SSIZE_T
  59. dnl Checks for header files.
  60. AC_HEADER_ASSERT
  61. AC_HEADER_STDC
  62. AC_HEADER_SYS_WAIT
  63. dnl Checks for typedefs, structures, and compiler characteristics.
  64. AC_C_CONST
  65. AC_TYPE_PID_T
  66. AC_TYPE_SIZE_T
  67. AC_TYPE_SSIZE_T
  68. AC_TYPE_UINT16_T
  69. AC_TYPE_UINT8_T
  70. AC_HEADER_TIME
  71. dnl Checks for library functions.
  72. AC_FUNC_FORK
  73. AC_FUNC_MALLOC
  74. AC_FUNC_SELECT_ARGTYPES
  75. AC_TYPE_SIGNAL
  76. AC_CHECK_FUNCS([memset select setresuid setreuid strerror])
  77. AC_SYS_LARGEFILE
  78. AC_CHECK_LIB(socket, connect)
  79. dnl Checks for library functions.
  80. AC_CHECK_FUNCS([malloc memset socket])
  81. ACX_PTHREAD
  82. AC_CONFIG_MACRO_DIR([m4])
  83. AC_CONFIG_FILES([Makefile
  84. libasyncns/Makefile
  85. libev/Makefile
  86. src/Makefile])
  87. AC_OUTPUT