1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- # -*- Autoconf -*-
- # Process this file with autoconf to produce a configure script.
-
- AC_PREREQ([2.69])
- AC_INIT([ttail], [0.0.1], [yann.weber@member.fsf.org])
- AM_INIT_AUTOMAKE
-
- #configure options
- AC_ARG_ENABLE([huge-file],[ --enable-huge-file to enable huge file support],
- [case "${enableval}" in
- yes) huge_file=true ;;
- no) huge_file=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-huge-file]) ;;
- esac],[huge_file=false])
- AM_CONDITIONAL([HUGEFILE], [test x$huge_file = xtrue])
- AC_ARG_ENABLE([debug],[ --enable-debug turn on debugging],
- [case "${enableval}" in
- yes) debug=true ;;
- no) debug=false ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
- esac],[debug=false])
- AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])
-
- AC_CONFIG_HEADERS([src/include/config.h])
- AC_CONFIG_SRCDIR([src/main.c])
- AC_CONFIG_MACRO_DIR([m4])
-
- # Checks for programs.
- AC_GNU_SOURCE
- AC_C_INLINE
- AC_C_CONST
- AC_PROG_CC
- AM_PROG_CC_C_O
- AC_PROG_MAKE_SET
- AC_PROG_RANLIB
-
- AC_CHECK_PROGS([DOXYGEN], [doxygen])
- if test -z "$DOXYGEN";
- then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
- fi
-
- AC_CHECK_PROGS([GIT], [git])
- if test -z "$DOXYGEN";
- then AC_MSG_WARN([git not found - continuing without Doxygen support])
- fi
-
- # Checks for libraries.
- AC_SEARCH_LIBS([dlopen], [dl dld], [], [
- AC_MSG_ERROR([unable to find the dlopen() function])
- ])
- PKG_CHECK_MODULES([CHECK], [check >= 0.9.4])
- AS_IF([test x$debug = xtrue], [CK_FORK=no],[])
-
- # Checks for header files.
- AC_CHECK_HEADERS([stdlib.h string.h])
-
- # Checks for typedefs, structures, and compiler characteristics.
- AC_TYPE_SIZE_T
- AS_IF([test x$debug = xtrue], [
- AX_CHECK_CFLAGS([-Wall])
- AX_CHECK_CFLAGS([-g])
- AX_CHECK_CFLAGS([-ggdb])
- AX_CHECK_CFLAGS([-O0])
- ],
- [
- AX_CHECK_CFLAGS([-O2])
- AX_CHECK_CFLAGS([-std=c99 -pedantic])
- AX_CHECK_CFLAGS([-Wall -Werror])
- AX_CHECK_CFLAGS([-fgnu89-inline])
- ])
- AX_CHECK_CFLAGS([-D_XOPEN_SOURCE -D_GNU_SOURCE])
- #Condition done in Makefile.am
- #AS_IF([test x$huge_file = xtrue], [
- #AX_CHECK_CFLAGS([-DTTAIL_HUGE_FILE])
- #],[])
-
- # Checks for library functions.
- AC_FUNC_MALLOC
- AC_FUNC_REALLOC
-
- AC_CONFIG_FILES([Makefile
- src/Makefile
- tests/Makefile])
-
- AM_CONDITIONAL([HAVE_DOXYGEN],
- [test -n "$DOXYGEN"])AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile
- docs/Makefile])])
-
- AC_OUTPUT
|