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.

47 lines
1.3 KiB

12 years ago
12 years ago
12 years ago
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.68])
  4. AC_INIT([shadowsocks], [0.9], [clowwindy42@gmail.com|max.c.lv@gmail.com])
  5. AC_CONFIG_SRCDIR([encrypt.c])
  6. AC_CONFIG_HEADERS([config.h])
  7. AM_INIT_AUTOMAKE([foreign -Wall -Werror])
  8. # Checks for programs.
  9. AC_PROG_CC
  10. # Checks for libraries.
  11. AC_SEARCH_LIBS([MD5], [crypto], [ ], AC_MSG_ERROR([libcrypto not found.]))
  12. AC_SEARCH_LIBS([ev_io_start], [ev], [ ], AC_MSG_ERROR([libev not found.]))
  13. # Checks for header files.
  14. AC_CHECK_HEADERS([arpa/inet.h fcntl.h langinfo.h locale.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/socket.h unistd.h])
  15. [echo -n "checking for little or big endian... " ]
  16. AC_TRY_RUN([
  17. #include <sys/types.h>
  18. int main()
  19. {
  20. uint16_t s = 1;
  21. uint16_t* ptr = &s;
  22. uint8_t n = *((uint8_t*)ptr);
  23. return n;
  24. }
  25. ]
  26. , AC_DEFINE([BIGENDIAN], [1], [Define to 1 if system is big endian])
  27. [echo "big"]
  28. , AC_DEFINE([LITTLEENDIAN], [1], [Define to 1 if system is little endian])
  29. [echo "little"]
  30. )
  31. # Checks for typedefs, structures, and compiler characteristics.
  32. AC_C_INLINE
  33. AC_TYPE_SSIZE_T
  34. # Checks for library functions.
  35. AC_FUNC_MALLOC
  36. AC_CHECK_FUNCS([memset socket])
  37. AC_CONFIG_FILES([Makefile])
  38. AC_OUTPUT