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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
  35. fi
  36. AC_CHECK_PROGS([GIT], [git])
  37. if test -z "$DOXYGEN";
  38. then AC_MSG_WARN([git not found - continuing without Doxygen support])
  39. fi
  40. # Checks for libraries.
  41. AC_SEARCH_LIBS([dlopen], [dl dld], [], [
  42. AC_MSG_ERROR([unable to find the dlopen() function])
  43. ])
  44. PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
  45. AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
  46. # Checks for header files.
  47. AC_CHECK_HEADERS([stdlib.h string.h])
  48. # Checks for typedefs, structures, and compiler characteristics.
  49. AC_TYPE_SIZE_T
  50. AS_IF([test x$debug = xtrue], [
  51. AX_CHECK_CFLAGS([-Wall])
  52. AX_CHECK_CFLAGS([-g])
  53. AX_CHECK_CFLAGS([-ggdb])
  54. AX_CHECK_CFLAGS([-O0])
  55. ],
  56. [
  57. AX_CHECK_CFLAGS([-O2])
  58. AX_CHECK_CFLAGS([-std=c99 -pedantic])
  59. AX_CHECK_CFLAGS([-Wall -Werror])
  60. AX_CHECK_CFLAGS([-fgnu89-inline])
  61. ])
  62. AX_CHECK_CFLAGS([-D_XOPEN_SOURCE -D_GNU_SOURCE])
  63. #Condition done in Makefile.am
  64. #AS_IF([test x$huge_file = xtrue], [
  65. #AX_CHECK_CFLAGS([-DTTAIL_HUGE_FILE])
  66. #],[])
  67. # Checks for library functions.
  68. AC_FUNC_MALLOC
  69. AC_FUNC_REALLOC
  70. AC_CONFIG_FILES([Makefile
  71. src/Makefile
  72. tests/Makefile])
  73. AM_CONDITIONAL([HAVE_DOXYGEN],
  74. [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
  75. docs/Makefile])])
  76. AC_OUTPUT