configure.in
上传用户:knt0001
上传日期:2022-01-28
资源大小:264k
文件大小:2k
源码类别:

Email客户端

开发平台:

C/C++

  1. #                                               -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ(2.57)
  4. AC_INIT(email, 3.1.2, <deanjones@cleancode.org>)
  5. AC_CONFIG_SRCDIR([src/addr_parse.c])
  6. AC_CONFIG_HEADER([include/config.h])
  7. AC_GNU_SOURCE
  8. version="3.1.2"
  9. date="01/04/2009-03:11:58PM_EST"
  10. cwd=`pwd`
  11. # Checks for programs.
  12. AC_PROG_CC
  13. AC_PROG_MAKE_SET
  14. AC_ARG_WITH(utc, [  --with-utc              Use Coordinated Universal Time (UTC) instead of localtime], [AC_DEFINE(USE_GMT, 1, [Tell's us to use gmtime()])], )
  15. AC_ARG_WITH(ssl, [  --with-ssl     force use of TLS/SSL], [use_ssl=$withval], )
  16. AC_SYS_LARGEFILE
  17. if test -n "$GCC"; then
  18.     CFLAGS="$CFLAGS -Wall -W"
  19. fi
  20. # Checks for libraries.
  21. AC_SEARCH_LIBS(socket, socket)
  22. AC_SEARCH_LIBS(sqrt, m)
  23. AC_SEARCH_LIBS(gethostbyname, nsl)
  24. if test -z "$use_ssl" -o "$use_ssl" = "yes"; then
  25. AC_CHECK_LIB(ssl, SSL_library_init)
  26. AC_SEARCH_LIBS(X509_free, crypto)
  27. AC_SEARCH_LIBS(RAND_seed, crypto)
  28. fi
  29. echo $LIBS
  30. # Checks for header files.
  31. AC_HEADER_STDC
  32. AC_HEADER_SYS_WAIT
  33. AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h netdb.h netinet/in.h stdlib.h string.h strings.h sys/ioctl.h sys/socket.h sys/time.h termios.h unistd.h])
  34. # Checks for typedefs, structures, and compiler characteristics.
  35. AC_HEADER_TIME
  36. AC_STRUCT_TM
  37. # Checks for library functions.
  38. AC_FUNC_FORK
  39. AC_PROG_GCC_TRADITIONAL
  40. AC_FUNC_MALLOC
  41. AC_FUNC_REALLOC
  42. AC_TYPE_SIGNAL
  43. AC_FUNC_STAT
  44. AC_FUNC_STRFTIME
  45. AC_FUNC_VPRINTF
  46. AC_CHECK_FUNCS([gethostbyname gethostname getpass gettimeofday memset putenv socket sqrt strcasecmp strchr strerror strrchr uname])
  47. echo $ECHO_N "checking if strftime is GNU or Non-GNU... "
  48. ${srcdir}/check_strftime.sh $CC
  49. if test $? -ne 0
  50. then
  51.     echo "Non-GNU"
  52. else
  53.     echo "GNU"
  54.     CFLAGS="$CFLAGS -DUSE_GNU_STRFTIME"
  55. fi
  56. AC_SUBST(ver, ["$version"])
  57. CFLAGS="$CFLAGS -I$cwd -I$cwd/src -I$cwd/include -I../include -I$cwd/dlib/include"
  58. CFLAGS="$CFLAGS -I../dlib/include -DEMAIL_VERSION='"$version"' -DCOMPILE_DATE='"$date"'"
  59. CFLAGS="$CFLAGS -DEMAIL_DIR='"${sysconfdir}/email"'"
  60. AC_CONFIG_FILES([Makefile
  61.                  src/Makefile
  62.                  email.help
  63.                  email.1])
  64. AC_OUTPUT
  65. if test "$use_ssl" = "no"; then
  66. args="--without-ssl"
  67. fi
  68. cd dlib
  69. ./configure $args
  70. cd ..