timed tail for logfiles. Display loglines given a minimum date and/or a maximum date.
c
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.

configure.ac 2.8KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. # -*- Autoconf -*-
  2. # Process this file with autoconf to produce a configure script.
  3. AC_PREREQ([2.69])
  4. AC_INIT([ttail], [0.0.1], [yann.weber@member.fsf.org])
  5. AM_INIT_AUTOMAKE
  6. #configure options
  7. AC_ARG_ENABLE([huge-file],[ --enable-huge-file to enable huge file support],
  8. [case "${enableval}" in
  9. yes) huge_file=true ;;
  10. no) huge_file=false ;;
  11. *) AC_MSG_ERROR([bad value ${enableval} for --enable-huge-file]) ;;
  12. esac],[huge_file=false])
  13. AM_CONDITIONAL([HUGEFILE], [test x$huge_file = xtrue])
  14. AC_ARG_ENABLE([debug],[ --enable-debug turn on debugging],
  15. [case "${enableval}" in
  16. yes) debug=true ;;
  17. no) debug=false ;;
  18. *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
  19. esac],[debug=false])
  20. AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
  21. AC_ARG_ENABLE([check],[ --disable-check disable unit test support],
  22. [case "${enableval}" in
  23. yes) check=true ;;
  24. no) check=false ;;
  25. *) AC_MSG_ERROR([bad value ${enableval} for --enable-check]) ;;
  26. esac],[check=true])
  27. AM_CONDITIONAL([CHECK], [test x$check = xtrue])
  28. AC_CONFIG_HEADERS([src/include/config.h])
  29. AC_CONFIG_SRCDIR([src/main.c])
  30. AC_CONFIG_MACRO_DIR([m4])
  31. # Checks for programs.
  32. AC_GNU_SOURCE
  33. AC_C_INLINE
  34. AC_C_CONST
  35. AC_PROG_CC
  36. AM_PROG_CC_C_O
  37. AC_PROG_MAKE_SET
  38. AC_PROG_RANLIB
  39. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  40. if test -z "$DOXYGEN";
  41. then
  42. AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  43. fi
  44. AC_CHECK_PROGS([GIT], [git])
  45. if test -z "$GIT";
  46. then
  47. AC_MSG_WARN([git not found - continuing without Doxygen support])
  48. AC_SUBST([DOXYFILE_FILE_VERSION_FILTER], [])
  49. else
  50. AC_SUBST([DOXYFILE_FILE_VERSION_FILTER], ["\"/bin/sh -c 'git log --pretty=\\\"format:%ci, author:%aN <%aE>, commit:%h\\\" -1 --'\""])
  51. fi
  52. # Checks for libraries.
  53. if test x$check = xtrue
  54. then
  55. PKG_CHECK_MODULES([CHECK], [check >= 0.9.4], [],
  56. AC_MSG_FAILURE([Unable to locate (check unit test c framework).
  57. You can run ./configure --disable-check if you do not need unit tests.
  58. ]))
  59. AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
  60. fi
  61. # Checks for header files.
  62. AC_CHECK_HEADERS([stdlib.h string.h])
  63. # Checks for typedefs, structures, and compiler characteristics.
  64. AC_TYPE_SIZE_T
  65. AS_IF([test x$debug = xtrue], [
  66. AX_CHECK_CFLAGS([-Wall])
  67. AX_CHECK_CFLAGS([-g])
  68. AX_CHECK_CFLAGS([-ggdb])
  69. AX_CHECK_CFLAGS([-O0])
  70. ],
  71. [
  72. AX_CHECK_CFLAGS([-O2])
  73. AX_CHECK_CFLAGS([-std=c99 -pedantic])
  74. AX_CHECK_CFLAGS([-Wall -Werror])
  75. AX_CHECK_CFLAGS([-fgnu89-inline])
  76. ])
  77. AX_CHECK_CFLAGS([-D_XOPEN_SOURCE -D_GNU_SOURCE])
  78. #Condition done in Makefile.am
  79. #AS_IF([test x$huge_file = xtrue], [
  80. #AX_CHECK_CFLAGS([-DTTAIL_HUGE_FILE])
  81. #],[])
  82. # Checks for library functions.
  83. AC_FUNC_MALLOC
  84. AC_FUNC_REALLOC
  85. AC_CONFIG_FILES([Makefile
  86. src/Makefile
  87. tests/Makefile])
  88. AM_CONDITIONAL([HAVE_DOXYGEN],
  89. [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
  90. docs/Makefile])])
  91. AC_OUTPUT