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.

106 lines
2.2 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
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.3.3], [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. dnl Checks for libev
  16. m4_include([libev/libev.m4])
  17. dnl Checks for openssl
  18. ss_OPENSSL
  19. dnl Checks for inet_ntop
  20. ss_FUNC_INET_NTOP
  21. dnl Checks for host.
  22. AC_MSG_CHECKING(for what kind of host)
  23. case $host in
  24. *-linux*)
  25. os_support=linux
  26. AC_MSG_RESULT(Linux)
  27. ;;
  28. *)
  29. AC_MSG_RESULT(transparent proxy does not support for $host)
  30. ;;
  31. esac
  32. AM_CONDITIONAL(BUILD_REDIRECTOR, test "$os_support" = "linux")
  33. dnl Checks for header files.
  34. 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])
  35. dnl A special check required for <net/if.h> on Darwin. See
  36. dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html.
  37. AC_CHECK_HEADERS([sys/socket.h])
  38. AC_CHECK_HEADERS([net/if.h], [], [],
  39. [
  40. #include <stdio.h>
  41. #ifdef STDC_HEADERS
  42. # include <stdlib.h>
  43. # include <stddef.h>
  44. #else
  45. # ifdef HAVE_STDLIB_H
  46. # include <stdlib.h>
  47. # endif
  48. #endif
  49. #ifdef HAVE_SYS_SOCKET_H
  50. # include <sys/socket.h>
  51. #endif
  52. ])
  53. AC_C_BIGENDIAN
  54. dnl Checks for typedefs, structures, and compiler characteristics.
  55. AC_C_INLINE
  56. AC_TYPE_SSIZE_T
  57. dnl Checks for header files.
  58. AC_HEADER_ASSERT
  59. AC_HEADER_STDC
  60. AC_HEADER_SYS_WAIT
  61. dnl Checks for typedefs, structures, and compiler characteristics.
  62. AC_C_CONST
  63. AC_TYPE_PID_T
  64. AC_TYPE_SIZE_T
  65. AC_TYPE_SSIZE_T
  66. AC_TYPE_UINT16_T
  67. AC_TYPE_UINT8_T
  68. AC_HEADER_TIME
  69. dnl Checks for library functions.
  70. AC_FUNC_FORK
  71. AC_FUNC_MALLOC
  72. AC_FUNC_SELECT_ARGTYPES
  73. AC_TYPE_SIGNAL
  74. AC_CHECK_FUNCS([memset select setresuid setreuid strerror])
  75. AC_SYS_LARGEFILE
  76. AC_CHECK_LIB(socket, connect)
  77. dnl Checks for library functions.
  78. AC_CHECK_FUNCS([malloc memset socket])
  79. ACX_PTHREAD
  80. AC_CONFIG_MACRO_DIR([m4])
  81. AC_CONFIG_FILES([Makefile
  82. libasyncns/Makefile
  83. libev/Makefile
  84. src/Makefile])
  85. AC_OUTPUT