# -*- 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]) AC_CONFIG_HEADERS([src/include/config.h]) AC_CONFIG_SRCDIR([src/ttail.c]) AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_GNU_SOURCE AC_PROG_CC AM_PROG_CC_C_O AC_PROG_MAKE_SET AC_PROG_RANLIB # 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]) # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_TYPE_SIZE_T #CFLAGS="$CFLAGS -I$(top_builddir)/src/include/" # Checks for library functions. AC_FUNC_MALLOC AC_FUNC_REALLOC 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]) 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([-ansi]) AX_CHECK_CFLAGS([-Wall -Werror]) AX_CHECK_CFLAGS([-fgnu89-inline]) ]) AX_CHECK_CFLAGS([-D_XOPEN_SOURCE -D_GNU_SOURCE]) AM_INIT_AUTOMAKE AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile]) AC_OUTPUT