Added a way to deinitialize running services
[profile/ivi/common-api-dbus-runtime.git] / configure.ac
1 AC_PREREQ(2.61)
2 AC_INIT([GENIVI Common API DBus C++ Library],
3         [0.7],
4         [],
5         [CommonAPI-DBus])
6
7 AC_CONFIG_MACRO_DIR([m4])
8 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
9 AC_CONFIG_AUX_DIR([build-aux])
10 AC_CONFIG_HEADERS([build-aux/config.h])
11 AC_CONFIG_FILES([
12                 Makefile
13                 CommonAPI-DBus.pc
14         CommonAPI-DBus-uninstalled.pc])
15
16 AC_CANONICAL_SYSTEM
17
18 AM_INIT_AUTOMAKE([foreign 1.11 silent-rules subdir-objects color-tests -Wall -Werror])
19 AM_SILENT_RULES
20 AM_MAINTAINER_MODE
21
22 AC_PROG_CXX
23 AC_LANG([C++])
24 AX_CXX_COMPILE_STDCXX_11([noext])
25
26 AC_ARG_VAR([GTEST_CONFIG], [The exact path of Google Test's 'gtest-config' script.])
27
28 LT_PREREQ(2.2)
29 LT_INIT
30
31 PKG_PROG_PKG_CONFIG
32 PKG_CHECK_MODULES(COMMONAPI, [CommonAPI >= 0.7])
33 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.4.6])
34
35 GTEST_MIN_VERSION="1.6.0"
36 GTEST_URL="http://code.google.com/p/googletest"
37
38
39 AC_ARG_VAR([GTEST_CONFIG], [The exact path of Google Test's 'gtest-config' script.])
40 AC_ARG_VAR([GTEST_CPPFLAGS], [C-like preprocessor flags for Google Test.])
41 AC_ARG_VAR([GTEST_CXXFLAGS], [C++ compile flags for Google Test.])
42 AC_ARG_VAR([GTEST_LDFLAGS], [Linker path and option flags for Google Test.])
43 AC_ARG_VAR([GTEST_LIBS], [Library linking flags for Google Test.])
44 AC_ARG_VAR([GTEST_VERSION], [The available version of Google Test.])
45
46 AS_IF([test -f "${GTEST_CONFIG}"],
47       [AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}],
48              [],
49              [AC_MSG_ERROR([dnl
50                             Found Google Test Version ${GTEST_VERSION}. However ${GTEST_MIN_VERSION} is
51                             required. Please refer to ${GTEST_URL} for a more recent version.])])
52        [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`]
53        [GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`]
54        [GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`]
55        [GTEST_LIBS=`${GTEST_CONFIG} --libs`]
56        [GTEST_VERSION=`${GTEST_CONFIG} --version`]
57       ]
58       []
59 )
60
61 AM_CONDITIONAL(ENABLE_TESTS, [test -f "${GTEST_CONFIG}"])
62
63
64 # Doxygen support
65 DX_HTML_FEATURE(ON)
66 DX_CHM_FEATURE(OFF)
67 DX_CHI_FEATURE(OFF)
68 DX_MAN_FEATURE(OFF)
69 DX_RTF_FEATURE(OFF)
70 DX_XML_FEATURE(OFF)
71 DX_PDF_FEATURE(OFF)
72 DX_PS_FEATURE(OFF)
73 DX_INIT_DOXYGEN(${PACKAGE_NAME}, doxygen.cfg, doc)
74     
75 AC_MSG_RESULT([
76         $PACKAGE_NAME v$VERSION
77
78         enable docs:       ${ENABLE_DOCS}
79
80                 COMMONAPI_CFLAGS:  ${COMMONAPI_CFLAGS}
81                 COMMONAPI_LIBS:    ${COMMONAPI_LIBS}
82
83                 DBUS_CFLAGS:       ${DBUS_CFLAGS}
84                 DBUS_LIBS:         ${DBUS_LIBS}
85
86         GTEST_CONFIG:      ${GTEST_CONFIG}
87         GTEST_CPPFLAGS:    ${GTEST_CPPFLAGS}
88         GTEST_CXXFLAGS:    ${GTEST_CXXFLAGS}
89         GTEST_LDFLAGS:     ${GTEST_LDFLAGS}
90         GTEST_LIBS:        ${GTEST_LIBS}
91         GTEST_VERSION:     ${GTEST_VERSION}
92
93         prefix:            ${prefix}
94         CXXFLAGS:          ${CXXFLAGS}
95         LDFLAGS:           ${LDFLAGS}
96 ])
97
98 AC_OUTPUT