1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.67])
AC_INIT([cclive], m4_esyscmd([./gen-ver.sh -c | tr -d '\n']),
[http://cclive.sf.net/bugs/],[],[http://cclive.sf.net/])
AC_CONFIG_SRCDIR([src/cc/application.cpp])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([config.aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_TARGET
AC_USE_SYSTEM_EXTENSIONS
AC_DEFINE_UNQUOTED([CANONICAL_TARGET], "$target", [...])
AC_DEFINE_UNQUOTED([CANONICAL_HOST], "$host", [...])
AM_INIT_AUTOMAKE([1.11.1 -Wall -Werror dist-xz no-dist-gzip tar-ustar subdir-objects])
AM_SILENT_RULES([no])
# GNU Automake 1.12 requires this macro. Earlier versions do not
# recognize this macro. Work around this.
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
LT_INIT([disable-static])
LT_PREREQ([2.2.6])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_CPP
AC_PROG_LN_S
AC_PATH_PROG([A2X], [a2x], [no])
AM_CONDITIONAL([HAVE_A2X], [test x"$A2X" != "xno"])
AC_SUBST([A2X])
AS_IF([test x"$A2X" = "xno" && test -d "$srcdir/.git"],
AC_MSG_ERROR([a2x is required to create man pages when building from git])])
# Checks for libraries.
PKG_CHECK_MODULES([libquvi], [libquvi >= 0.4.0],
[AC_DEFINE([HAVE_LIBQUVI_0_4_0], [1], [We have libquvi 0.4.0+])],
[PKG_CHECK_MODULES([libquvi], [libquvi >= 0.2.16.1])])
PKG_CHECK_MODULES([libcurl], [libcurl >= 7.18.0])
PKG_CHECK_MODULES([libpcre], [libpcre >= 8.02])
PKG_CHECK_MODULES([libpcrecpp], [libpcrecpp >= 8.02])
BOOST_REQUIRE([1.42.0])
# Boost: Header-only libs
BOOST_FOREACH
BOOST_FORMAT
# Boost: Libs requiring linking
BOOST_DATE_TIME
BOOST_PROGRAM_OPTIONS
BOOST_IOSTREAMS
BOOST_FILESYSTEM
BOOST_SYSTEM
# Checks for header files.
AC_CHECK_HEADERS([sys/ioctl.h unistd.h sys/types.h sys/stat.h signal.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STDBOOL
AC_TYPE_SIZE_T
AC_TYPE_PID_T
AC_C_INLINE
# Checks for library functions.
AC_CHECK_FUNCS([strerror strstr getpid signal memset setlocale])
AC_FUNC_ERROR_AT_LINE
AC_FUNC_STRERROR_R
AC_FUNC_FORK
# Version.
VN=`$srcdir/gen-ver.sh`
AC_DEFINE_UNQUOTED([VN],["$VN"], [We have version number from gen-ver.sh])
# --with-manual
AC_ARG_WITH([manual],
[AS_HELP_STRING([--with-manual],
[Install manual page(s) @<:@default=yes@:>@])],
[],
[with_manual=yes])
AM_CONDITIONAL([WITH_MANUAL], [test x"$with_manual" != "xno"])
# --enable-ccl
AC_ARG_ENABLE([ccl],
[AS_HELP_STRING([--enable-ccl],
[Symlink from 'cclive' executable to 'ccl' @<:@default=yes@:>@])],
[],
[enable_ccl=yes])
AM_CONDITIONAL([ENABLE_CCL], [test x"$enable_ccl" = "xyes"])
AC_CONFIG_FILES([
Makefile
doc/Makefile
doc/man1/Makefile
src/Makefile
])
AC_OUTPUT
AC_MSG_NOTICE([
version: ${VERSION}
prefix: ${prefix}
compiler: ${CXX}
flags: ${CXXFLAGS}
System types:
target ${target}
build ${build}
host ${host}
Options:
add ccl symlink: ${enable_ccl}
install manual : ${with_manual}])
# vim: set ts=2 sw=2 tw=72 expandtab:
|