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.5KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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_CONFIG_HEADERS([src/include/config.h])
  22. AC_CONFIG_SRCDIR([src/main.c])
  23. AC_CONFIG_MACRO_DIR([m4])
  24. # Checks for programs.
  25. AC_GNU_SOURCE
  26. AC_C_INLINE
  27. AC_C_CONST
  28. AC_PROG_CC
  29. AM_PROG_CC_C_O
  30. AC_PROG_MAKE_SET
  31. AC_PROG_RANLIB
  32. AC_CHECK_PROGS([DOXYGEN], [doxygen])
  33. if test -z "$DOXYGEN";
  34. then
  35. AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  36. fi
  37. AC_CHECK_PROGS([GIT], [git])
  38. if test -z "$GIT";
  39. then
  40. AC_MSG_WARN([git not found - continuing without Doxygen support])
  41. AC_SUBST([DOXYFILE_FILE_VERSION_FILTER], [])
  42. else
  43. AC_SUBST([DOXYFILE_FILE_VERSION_FILTER], ["\"/bin/sh -c 'git log --pretty=\\\"format:%ci, author:%aN <%aE>, commit:%h\\\" -1 --'\""])
  44. fi
  45. # Checks for libraries.
  46. AC_SEARCH_LIBS([dlopen], [dl dld], [], [
  47. AC_MSG_ERROR([unable to find the dlopen() function])
  48. ])
  49. PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
  50. AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
  51. # Checks for header files.
  52. AC_CHECK_HEADERS([stdlib.h string.h])
  53. # Checks for typedefs, structures, and compiler characteristics.
  54. AC_TYPE_SIZE_T
  55. AS_IF([test x$debug = xtrue], [
  56. AX_CHECK_CFLAGS([-Wall])
  57. AX_CHECK_CFLAGS([-g])
  58. AX_CHECK_CFLAGS([-ggdb])
  59. AX_CHECK_CFLAGS([-O0])
  60. ],
  61. [
  62. AX_CHECK_CFLAGS([-O2])
  63. AX_CHECK_CFLAGS([-std=c99 -pedantic])
  64. AX_CHECK_CFLAGS([-Wall -Werror])
  65. AX_CHECK_CFLAGS([-fgnu89-inline])
  66. ])
  67. AX_CHECK_CFLAGS([-D_XOPEN_SOURCE -D_GNU_SOURCE])
  68. #Condition done in Makefile.am
  69. #AS_IF([test x$huge_file = xtrue], [
  70. #AX_CHECK_CFLAGS([-DTTAIL_HUGE_FILE])
  71. #],[])
  72. # Checks for library functions.
  73. AC_FUNC_MALLOC
  74. AC_FUNC_REALLOC
  75. AC_CONFIG_FILES([Makefile
  76. src/Makefile
  77. tests/Makefile])
  78. AM_CONDITIONAL([HAVE_DOXYGEN],
  79. [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
  80. docs/Makefile])])
  81. AC_OUTPUT