configure.in 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. dnl Process this file with autoconf to produce a configure script.
  2. dnl $Id: configure.in,v 1.13.2.39 2002/02/10 21:57:51 guus Exp $
  3. AC_INIT(src/tincd.c)
  4. AM_INIT_AUTOMAKE(tinc, 1.0-cvs)
  5. AM_CONFIG_HEADER(config.h)
  6. dnl Include the macros from the m4/ directory
  7. AM_ACLOCAL_INCLUDE(m4)
  8. # Enable GNU extensions.
  9. # Define this here, not in acconfig's @TOP@ section, since definitions
  10. # in the latter don't make it into the configure-time tests.
  11. AC_DEFINE([_GNU_SOURCE], [__USE_BSD])
  12. ALL_LINGUAS="nl"
  13. dnl Checks for programs.
  14. AC_PROG_CC
  15. AC_PROG_CPP
  16. AC_PROG_GCC_TRADITIONAL
  17. AC_PROG_AWK
  18. AC_PROG_INSTALL
  19. AC_PROG_LN_S
  20. AC_PROG_MAKE_SET
  21. jm_PERL
  22. AC_ISC_POSIX
  23. dnl Check and set OS
  24. AC_CANONICAL_HOST
  25. case $host_os in
  26. *linux*)
  27. AC_DEFINE(HAVE_LINUX)
  28. [ rm -f src/device.c; ln -sf linux/device.c src/device.c ]
  29. ;;
  30. *freebsd*)
  31. AC_DEFINE(HAVE_FREEBSD)
  32. [ rm -f src/device.c; ln -sf freebsd/device.c src/device.c ]
  33. ;;
  34. *solaris*)
  35. AC_DEFINE(HAVE_SOLARIS)
  36. [ rm -f src/device.c; ln -sf solaris/device.c src/device.c ]
  37. ;;
  38. *openbsd*)
  39. AC_DEFINE(HAVE_OPENBSD)
  40. [ rm -f src/device.c; ln -sf openbsd/device.c src/device.c ]
  41. ;;
  42. esac
  43. AC_CACHE_SAVE
  44. dnl Checks for libraries.
  45. dnl Checks for header files.
  46. AC_HEADER_STDC
  47. AC_CHECK_HEADERS([fcntl.h limits.h sys/ioctl.h syslog.h unistd.h \
  48. sys/time.h malloc.h strings.h sys/file.h])
  49. dnl Checks for typedefs, structures, and compiler characteristics.
  50. AC_C_CONST
  51. AC_TYPE_PID_T
  52. AC_TYPE_SIZE_T
  53. AC_HEADER_TIME
  54. AC_STRUCT_TM
  55. dnl Checks for library functions.
  56. AC_FUNC_MEMCMP
  57. AC_FUNC_ALLOCA
  58. AC_TYPE_SIGNAL
  59. AC_CHECK_FUNCS([ftime socket select strtol strerror flock unsetenv \
  60. asprintf putenv strdup fcloseall daemon strsignal get_current_dir_name])
  61. jm_FUNC_MALLOC
  62. jm_FUNC_REALLOC
  63. AM_GNU_GETTEXT
  64. dnl Support for SunOS
  65. AC_CHECK_FUNC(socket, [], [
  66. AC_CHECK_LIB(socket, connect)
  67. ])
  68. AC_CHECK_FUNC(gethostbyname, [], [
  69. AC_CHECK_LIB(nsl, gethostbyname)
  70. ])
  71. AC_CACHE_SAVE
  72. dnl These are defined in files in m4/
  73. tinc_TUNTAP
  74. tinc_OPENSSL
  75. dnl Check if checkpoint tracing has to be enabled
  76. AC_ARG_ENABLE(tracing,
  77. [ --enable-tracing enable checkpoint tracing (debugging only)],
  78. [ AC_DEFINE(ENABLE_TRACING) ]
  79. )
  80. AC_SUBST(INCLUDES)
  81. AC_OUTPUT(Makefile
  82. src/Makefile
  83. doc/Makefile
  84. doc/es/Makefile
  85. intl/Makefile
  86. lib/Makefile
  87. m4/Makefile
  88. po/Makefile.in
  89. po/POTFILES
  90. po/Makefile
  91. )