2 AC_INIT([GENIVI Common API DBus C++ Library],
7 AC_USE_SYSTEM_EXTENSIONS
9 AC_CONFIG_MACRO_DIR([m4])
10 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
11 AC_CONFIG_AUX_DIR([build-aux])
12 AC_CONFIG_HEADERS([build-aux/config.h])
16 CommonAPI-DBus-uninstalled.pc])
20 AM_INIT_AUTOMAKE([foreign 1.11 silent-rules subdir-objects color-tests -Wall -Werror])
26 AX_CXX_COMPILE_STDCXX_11([noext])
28 AC_ARG_VAR([GTEST_CONFIG], [The exact path of Google Test's 'gtest-config' script.])
34 PKG_CHECK_MODULES(COMMONAPI, [CommonAPI = 2.0.5])
35 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.4.6])
36 PKG_CHECK_MODULES(GLIB, [glib-2.0],
39 echo "WARNING: No glib found, tests will not be compiled!"
40 TESTS_CAN_BE_EXECUTED=false
44 GTEST_MIN_VERSION="1.6.0"
45 GTEST_URL="http://code.google.com/p/googletest"
48 AC_ARG_VAR([GTEST_CONFIG], [The exact path of Google Test's 'gtest-config' script.])
49 AC_ARG_VAR([GTEST_CPPFLAGS], [C-like preprocessor flags for Google Test.])
50 AC_ARG_VAR([GTEST_CXXFLAGS], [C++ compile flags for Google Test.])
51 AC_ARG_VAR([GTEST_LDFLAGS], [Linker path and option flags for Google Test.])
52 AC_ARG_VAR([GTEST_LIBS], [Library linking flags for Google Test.])
53 AC_ARG_VAR([GTEST_VERSION], [The available version of Google Test.])
55 AS_IF([test -f "${GTEST_CONFIG}"],
56 [AS_IF([${GTEST_CONFIG} --min-version=${GTEST_MIN_VERSION}],
59 Found Google Test Version ${GTEST_VERSION}. However ${GTEST_MIN_VERSION} is
60 required. Please refer to ${GTEST_URL} for a more recent version.])])
61 [GTEST_CPPFLAGS=`${GTEST_CONFIG} --cppflags`]
62 [GTEST_CXXFLAGS=`${GTEST_CONFIG} --cxxflags`]
63 [GTEST_LDFLAGS=`${GTEST_CONFIG} --ldflags`]
64 [GTEST_LIBS=`${GTEST_CONFIG} --libs`]
65 [GTEST_VERSION=`${GTEST_CONFIG} --version`]
70 AM_CONDITIONAL(ENABLE_TESTS, [test -f "${GTEST_CONFIG}" && ${TESTS_CAN_BE_EXECUTED}])
81 DX_INIT_DOXYGEN(${PACKAGE_NAME}, doxygen.cfg, doc)
84 $PACKAGE_NAME v$VERSION
86 enable docs: ${ENABLE_DOCS}
88 COMMONAPI_CFLAGS: ${COMMONAPI_CFLAGS}
89 COMMONAPI_LIBS: ${COMMONAPI_LIBS}
91 DBUS_CFLAGS: ${DBUS_CFLAGS}
92 DBUS_LIBS: ${DBUS_LIBS}
94 GTEST_CONFIG: ${GTEST_CONFIG}
95 GTEST_CPPFLAGS: ${GTEST_CPPFLAGS}
96 GTEST_CXXFLAGS: ${GTEST_CXXFLAGS}
97 GTEST_LDFLAGS: ${GTEST_LDFLAGS}
98 GTEST_LIBS: ${GTEST_LIBS}
99 GTEST_VERSION: ${GTEST_VERSION}
102 CXXFLAGS: ${CXXFLAGS}