AC_INIT(lnav, 0.1.0, timothyshanestack@gmail.com) AC_CONFIG_SRCDIR([src/lnav.cc]) AM_INIT_AUTOMAKE(lnav, 0.1.0) AC_PREFIX_DEFAULT(/usr/) AC_CANONICAL_HOST dnl abssrcdir is the absolute path to the source base (regardless of where dnl you are building it) case x$srcdir in x/*) abssrcdir=$srcdir ;; *) abssrcdir=`pwd`/$srcdir ;; esac AC_SUBST(abssrcdir) AC_PROG_CXX #CFLAGS=`echo $CFLAGS | sed 's/-O2//g'` #CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'` AC_ARG_ENABLE([profiling], AS_HELP_STRING([--enable-profiling], [Compile with gprof(1) profiling support])) AC_MSG_CHECKING(gprof(4) profiling support) if test x"${enable_profiling}" = x"yes" ; then CFLAGS="$CFLAGS -pg -gstabs" CXXFLAGS="$CXXFLAGS -pg -gstabs" LDFLAGS="$LDFLAGS -pg" else enable_profiling=no fi AC_MSG_RESULT($enable_profiling) AC_SUBST(CFLAGS_PG) AC_PROG_INSTALL AC_PROG_RANLIB AC_PROG_LN_S AC_PROG_MAKE_SET AC_CHECK_SIZEOF(off_t) AC_CHECK_SIZEOF(size_t) AC_CHECK_PROG(OBJCOPY, objcopy, objcopy) AM_CONDITIONAL(HAVE_OBJCOPY, test x"$OBJCOPY" != x"") case "$host_cpu" in x86_64) OBJ_FORMAT=elf64-x86-64 ;; *) AC_WARN("embedded help not supported for $host_cpu") ;; esac AM_CONDITIONAL(HAVE_OBJ_FORMAT, test x"$OBJ_FORMAT" != x"" -a x"$OBJCOPY" != x"") AC_SUBST(OBJ_FORMAT) AC_SEARCH_LIBS(openpty, util) AC_SEARCH_LIBS(gzseek, libz) AC_CHECK_HEADERS(pty.h util.h zlib.h) MP_WITH_CURSES() AX_PATH_LIB_PCRE([], [AC_MSG_ERROR([pcre required to build])]) AX_PATH_LIB_READLINE([], [AC_MSG_ERROR([readline required to build])]) AX_LIB_SQLITE3("3.0.0") AM_CONDITIONAL(HAVE_LIBSQLITE3, [ test -n "$SQLITE3_CFLAGS" -a -n "$SQLITE3_LDFLAGS"]) case "$host_os" in darwin*) AC_DEFINE([_APPLE_C_SOURCE], [], [Needed for the 'timezone' variable]) ;; *) AC_DEFINE([_XOPEN_SOURCE], [500], [Need pread]) AC_DEFINE([_BSD_SOURCE], [], [Need pread]) ;; esac AM_CONFIG_HEADER([src/config.h]) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([TESTS_ENVIRONMENT]) AC_CONFIG_FILES([src/Makefile]) AC_CONFIG_FILES([test/Makefile]) AC_OUTPUT