File: configure.ac

package info (click to toggle)
cclive 0.9.3-0.1
  • links: PTS, VCS
  • area: main
  • in suites: sid, stretch
  • size: 2,404 kB
  • sloc: sh: 11,339; cpp: 3,198; makefile: 138
file content (135 lines) | stat: -rw-r--r-- 3,555 bytes parent folder | download
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ([2.69])

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",
  [Define to canonical target])

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_DEFINE_UNQUOTED([CXXFLAGS], "$CXXFLAGS", [Define to compiler flags])
AC_DEFINE_UNQUOTED([CXX], "$CXX", [Define to compiler])

AC_PATH_PROG([DATE], [date], [no])
AS_IF([test x"$DATE" != "xno"], [build_time=`$DATE +"%F %T %z"`])
AC_DEFINE_UNQUOTED([BUILD_TIME], ["$build_time"], [We have build time])

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.

have_libquvi_0_9=
PKG_CHECK_MODULES([libquvi], [libquvi-0.9 >= 0.9],
  [
    AC_DEFINE([HAVE_LIBQUVI_0_9], [1], [We have libquvi 0.9])
    have_libquvi_0_9=yes
  ],
  [PKG_CHECK_MODULES([libquvi], [libquvi >= 0.4])])
AM_CONDITIONAL([HAVE_LIBQUVI_0_9], [test x"$have_libquvi_0_9" = "xyes"])

PKG_CHECK_MODULES([libcurl], [libcurl >= 7.18.0])
PKG_CHECK_MODULES([libpcre], [libpcre >= 8.02])
PKG_CHECK_MODULES([libpcrecpp], [libpcrecpp >= 8.02])
PKG_CHECK_MODULES([glibmm], [glibmm-2.4 >= 2.24])
PKG_CHECK_MODULES([glib], [glib-2.0 >= 2.24])

BOOST_REQUIRE([1.49.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 sigaction 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: