aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 7aa0742366629ce93840e87a2f5c416ada05732c (plain)
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
AC_PREREQ([2.61])
AC_INIT([ContextKit], [0.4], [marius.vollmer@nokia.com], ContextKit)

AC_CONFIG_SRCDIR([Makefile.am])
AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2 tar-ustar 1.9])

AC_CONFIG_MACRO_DIR([m4])

AC_PROG_CC
CFLAGS="$CXXFLAGS -Wall"
AC_PROG_CXX
CXXFLAGS="$CXXFLAGS -Wall"
LT_INIT([disable-static])
DOLT
AM_PATH_PYTHON

# check for libraries
PKG_CHECK_MODULES_SUBST([QtTest], [QtTest])
PKG_CHECK_MODULES_SUBST([QtCore], [QtCore])
PKG_CHECK_MODULES_SUBST([QtDBus], [QtDBus])
PKG_CHECK_MODULES_SUBST([QtXml], [QtXml])
# only for compiling c code
PKG_CHECK_MODULES_SUBST([DBUS], [dbus-1])
PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.12.0])

AC_PROG_QT_MOC
AC_PROG_QT_UIC
AC_PROG_QT_RCC
AC_CHECK_LIB([cdb], [cdb_make_start], [CDB_LIBS=-lcdb], [AC_MSG_ERROR([Can't find cdb library])])
AC_SUBST([CDB_LIBS])

# tools for documentation
AX_FEATURE_DISABLEABLE([doc], [BUILD_DOCS], [disable building of documentation])
AX_DISABLE_FEATURE_ON_PROG([Dot drawing tool], [BUILD_DOCS], [DOT], [dot])
AX_DISABLE_FEATURE_ON_PROG([Asciidoc], [BUILD_DOCS], [ASCIIDOC], [asciidoc], [8.2.7])
AX_DISABLE_FEATURE_ON_PROG([source-highlight], [BUILD_DOCS], [SOURCE_HIGHLIGHT], [source-highlight])
AX_DISABLE_FEATURE_ON_PROG([xsltproc], [BUILD_DOCS], [XSLTPROC], [xsltproc])
AX_DISABLE_FEATURE_ON_PROG([xmllint], [BUILD_DOCS], [XMLLINT], [xmllint])
AX_DISABLE_FEATURE_ON_PROG([doxygen], [BUILD_DOCS], [DOXYGEN], [doxygen])
AM_CONDITIONAL([CONTEXTKIT_BUILD_DOCS], [test "$missing_deps_BUILD_DOCS" = ""])

# coverage tools
AX_FEATURE_DISABLEABLE([coverage], [COVERAGE], [disable unittests' coverage support])
AX_DISABLE_FEATURE_ON_PROG([GCov coverage recording tool], [COVERAGE], [GCOV], [gcov])
AX_DISABLE_FEATURE_ON_PROG([LCov coverage visualization tool], [COVERAGE], [LCOV], [lcov])
AM_CONDITIONAL([CONTEXTKIT_COVERAGE], [test "$missing_deps_COVERAGE" = ""])

AC_CONFIG_FILES([
        Makefile
        doc/Makefile
        common/Makefile
        libcontextsubscriber/Makefile
        libcontextsubscriber/cli/Makefile
        libcontextsubscriber/cls/Makefile
        libcontextsubscriber/contextsubscriber-1.0.pc
        libcontextsubscriber/customer-tests/Makefile
        libcontextsubscriber/customer-tests/update-contextkit-providers/Makefile
        libcontextsubscriber/customer-tests/testplugins/Makefile
        libcontextsubscriber/customer-tests/testplugins/timeplugin1/Makefile
        libcontextsubscriber/customer-tests/testplugins/timeplugin2/Makefile
        libcontextsubscriber/doc/Makefile
        libcontextsubscriber/man/Makefile
        libcontextsubscriber/src/Makefile
        libcontextsubscriber/unit-tests/Makefile
        libcontextsubscriber/unit-tests/cdb/Makefile
        libcontextsubscriber/unit-tests/infoxmlbackend/Makefile
        libcontextsubscriber/unit-tests/infocdbbackend/Makefile
        libcontextsubscriber/unit-tests/contextregistryinfo/Makefile
        libcontextsubscriber/unit-tests/contextpropertyinfo/Makefile
        libcontextsubscriber/unit-tests/infobackend/Makefile
        libcontextsubscriber/unit-tests/handlesignalrouter/Makefile
        libcontextsubscriber/unit-tests/propertyhandle/Makefile
        libcontextsubscriber/unit-tests/provider/Makefile
        libcontextsubscriber/unit-tests/util/Makefile
        libcontextsubscriber/unit-tests/nanoxml/Makefile
        libcontextsubscriber/update-contextkit-providers/Makefile
        libcontextprovider/contextprovider-1.0.pc
        libcontextprovider/Makefile
        libcontextprovider/doc/Makefile
        libcontextprovider/src/Makefile
        libcontextprovider/context-provide/Makefile
        libcontextprovider/man/Makefile
        libcontextprovider/unit-tests/Makefile
        libcontextprovider/unit-tests/contextgroup/Makefile
        libcontextprovider/unit-tests/property/Makefile
        libcontextprovider/unit-tests/contextc/Makefile
        libcontextprovider/unit-tests/service/Makefile
        libcontextprovider/unit-tests/servicebackend/Makefile
        libcontextprovider/customer-tests/Makefile
        libcontextprovider/customer-tests/subscription/Makefile
        libcontextprovider/customer-tests/client/Makefile
        libcontextprovider/customer-tests/value-changes/Makefile
        libcontextprovider/customer-tests/types/Makefile
        libcontextprovider/customer-tests/c-api/Makefile
        libcontextprovider/customer-tests/service/Makefile
        python/Makefile
        spec/Makefile
        tools/Makefile
        tools/loadmem/Makefile
])

AC_OUTPUT

AX_FEATURE_SUMMARIZE([BUILD_DOCS],
		     [Building of documentation is enabled],
		     [Documentation won't be built])

AX_FEATURE_SUMMARIZE([COVERAGE],
		     [Unit testing coverage support is enabled],
		     [Coverage won't be supported during unit testing])