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.

103 lines
2.3 KiB

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